module Main(main) where

-- | solve
--
-- >>> solve 1 3
-- 3
--
-- >>> solve 0 1
-- 0
--
-- >>> solve 32 21
-- 58
--
solve :: Int -> Int -> Int
solve a p = (a * 3 + p) `div` 2


main :: IO ()
main = do
    [a, p] <- map read . words <$> getLine
    let res = solve a p
    putStrLn $ show res
