output_description: Print the numbers of Sugim's manju and Sigma's manju at the end of the game,
  in this order, with a space in between.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      a_1 a_2 ... a_N
attempt: n = input()
  slimes = map(int, input().split())
  res = 0
  last = -1
  cnt = 0
  for slime in slimes:
      if slime != last:
          res += cnt // 2
          last = slime
          cnt = 1
      else:
          cnt += 1
  
  res += cnt // 2
  
  print(res)
  
problem_description: Statement
  
  There are N boxes arranged in a row from left to right. The i-th box from the
  left contains a_i manju (buns stuffed with bean paste). Sugim and Sigma play a
  game using these boxes. They alternately perform the following operation.
  Sugim goes first, and the game ends when a total of N operations are
  performed.
  
    * Choose a box that still does not contain a piece and is adjacent to the box chosen in the other player's **last** operation, then put a piece in that box. If there are multiple such boxes, any of them can be chosen.
    * If there is no box that satisfies the condition above, or this is Sugim's first operation, choose any one box that still does not contain a piece, then put a piece in that box.
  
  At the end of the game, each player can have the manju in the boxes in which
  he put his pieces. They love manju, and each of them is wise enough to perform
  the optimal moves in order to have the maximum number of manju at the end of
  the game.
  
  Find the number of manju that each player will have at the end of the game.
samples: [{"input": "5\n    20 100 10 1 10", "output": "120 21\n    \n\nIf the two performs the optimal moves, the game proceeds as follows:\n\n  * First, Sugim has to put his piece in the second box from the left.\n  * Then, Sigma has to put his piece in the leftmost box.\n  * Then, Sugim puts his piece in the third or fifth box.\n  * Then, Sigma puts his piece in the fourth box.\n  * Finally, Sugim puts his piece in the remaining box.\n\n* * *"}, {"input": "6\n    4 5 1 1 4 5", "output": "11 9\n    \n\n* * *"}, {"input": "5\n    1 10 100 10 1", "output": "102 20"}]