import           Control.Monad
import           Data.Array
import qualified Data.ByteString.Char8         as BS
import           Data.List
import           Data.Maybe
import           Data.Ord

readInts :: IO [Int]
readInts = map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine

main :: IO ()
main = do
  (p : q : r : _) <- readInts
  print $ solve p q r

solve :: (Ord a, Num a) => a -> a -> a -> a
solve p q r = min (p + q) (min (p + r) (r + q))

