output_description: Print the maximum number of pairs that Snuke can create.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
      A_1
      :
      A_N
attempt: N, *A = open(0).read().split()
  print(sum([sum(map(int, t)) // 2 for t in "".join(A).split("0")]))
  
problem_description: Statement
  
  Snuke has a large collection of cards. Each card has an integer between 1 and
  N, inclusive, written on it. He has A_i cards with an integer i.
  
  Two cards can form a pair if the absolute value of the difference of the
  integers written on them is at most 1.
  
  Snuke wants to create the maximum number of pairs from his cards, on the
  condition that no card should be used in multiple pairs. Find the maximum
  number of pairs that he can create.
samples: [{"input": "4\n    4\n    0\n    3\n    2", "output": "4\n    \n\nFor example, Snuke can create the following four pairs:\n(1,1),(1,1),(3,4),(3,4).\n\n* * *"}, {"input": "8\n    2\n    0\n    1\n    6\n    0\n    8\n    2\n    1", "output": "9"}]