{-# LANGUAGE BangPatterns      #-} --引数に!

import Data.Bits
import Data.Foldable (foldlM,foldrM)
import Data.Maybe (fromJust)
import Data.List
import qualified Data.Vector.Unboxed.Mutable as V
import Control.Monad
import qualified Data.ByteString.Lazy.Char8 as BS

main :: IO ()
main = do
  [a,p] <- map read.words <$> getLine :: IO [Int]
  print $ (3*a+p) `div` 2
