import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
import Data.List

solve :: [Int] -> Int
solve = sum . (take 2) . sort

main :: IO()
main = do
    a <- map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine
    print $ solve a 
