import Control.Applicative

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