import Control.Applicative

main = do
  _ <- read <$> getLine :: IO Integer
  as <- map read.lines <$> getContents :: IO [Int]
  let ao = sum $ map (`div`2) $ map snd $ filter (odd.fst)  $ zip [1..] $ zipWith (+) as (tail as)
      ae = sum $ map (`div`2) $ map snd $ filter (even.fst) $ zip [1..] $ zipWith (+) as (tail as)
  print $ max ao ae
