output_description: Print the sum of the evaluated value over all possible formulas.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      S
attempt: from sys import stdin
  
  n = int(stdin.readline().rstrip())
  li = [list(map(int, stdin.readline().rstrip().split())) for _ in range(n)]
  point = 0
  for i in range(101):
      for j in range(101):
          flag = True
          kizyun = False
          count = 0
          for a, b, c in li:
              if c != 0:
                  count += 1
                  if kizyun == False:
                      h = c + abs(a - i) + abs(b - j)
                      if h - abs(a - i) - abs(b - j) != c:
                          flag = False
                      kizyun = True
                  else:
                      k = c + abs(a - i) + abs(b - j)
                      if h != k and kizyun == True:
                          flag = False
              if count == 1:
                  print(a, b, c)
                  exit()
          if flag == True:
              point += 1
              print(i, j, h)
  
problem_description: Statement
  
  You are given a string S consisting of digits between `1` and `9`, inclusive.
  You can insert the letter `+` into some of the positions (possibly none)
  between two letters in this string. Here, `+` must not occur consecutively
  after insertion.
  
  All strings that can be obtained in this way can be evaluated as formulas.
  
  Evaluate all possible formulas, and print the sum of the results.
samples: [{"input": "125", "output": "176\n    \n\nThere are 4 formulas that can be obtained: `125`, `1+25`, `12+5` and `1+2+5`.\nWhen each formula is evaluated,\n\n  * 125\n  * 1+25=26\n  * 12+5=17\n  * 1+2+5=8\n\nThus, the sum is 125+26+17+8=176.\n\n* * *"}, {"input": "9999999999", "output": "12656242944"}]