output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      s_1 s_2 s_3
attempt: n = int(input())
  b = list(map(int, input().split()))
  a = b
  condition = ""
  cnt = 0
  wa = 0
  for i in range(n):
      wa += a[i]
      if i == 0:
          if a[i] > 0:
              condition = "minus"
          else:
              condition = "plus"
      elif condition == "plus":
          condition = "minus"
          if wa <= 0:
              cnt += abs(wa) + 1
              a[i] += abs(wa) + 1
              wa += abs(wa) + 1
      elif condition == "minus":
          condition = "plus"
          if wa >= 0:
              cnt += abs(wa) + 1
              a[i] -= abs(wa) + 1
              wa -= abs(wa) + 1
  
  cnt1 = cnt
  a = b
  condition = ""
  cnt = 0
  wa = 0
  for i in range(n):
      a[i] = a[i] / abs(a[i]) * (-1)
      cnt += abs(a[i]) + 1
      wa += a[i]
      if i == 0:
          if a[i] > 0:
              condition = "minus"
          else:
              condition = "plus"
      elif condition == "plus":
          condition = "minus"
          if wa <= 0:
              cnt += abs(wa) + 1
              a[i] += abs(wa) + 1
              wa += abs(wa) + 1
      elif condition == "minus":
          condition = "plus"
          if wa >= 0:
              cnt += abs(wa) + 1
              a[i] -= abs(wa) + 1
              wa -= abs(wa) + 1
  
  cnt2 = cnt
  print(min(cnt1, cnt2))
  
problem_description: Statement
  
  You are given three words s_1, s_2 and s_3, each composed of lowercase English
  letters, with spaces in between. Print the acronym formed from the uppercased
  initial letters of the words.
samples: [{"input": "atcoder beginner contest", "output": "ABC\n    \n\nThe initial letters of `atcoder`, `beginner` and `contest` are `a`, `b` and\n`c`. Uppercase and concatenate them to obtain `ABC`.\n\n* * *"}, {"input": "resident register number", "output": "RRN\n    \n\n* * *"}, {"input": "k nearest neighbor", "output": "KNN\n    \n\n* * *"}, {"input": "async layered coding", "output": "ALC"}]