output_description: Print the number of days before the next Sunday.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: A, B, X = map(int, input().split())
  
  low = 0
  high = 10**10
  
  for i in range(10**9):
  
      if high - low == 1:
          if A * high + B * len(str(high)) <= X:
              print(high)
              break
          else:
              print(low)
              break
  
      if (high - low) % 2 == 0:
          N = (high - low) // 2 + low
          tmp = A * N + B * len(str(N))
  
          if tmp < X:
              low = N
          elif tmp > X:
              high = N
          elif tmp == X:
              print(N)
              break
  
      else:
          N = (high - low) / 2 + low
          floor = int(N)
          ceil = floor + 1
  
          tmp_floor = A * floor + B * len(str(floor))
          tmp_ceil = A * ceil + B * len(str(ceil))
  
          if tmp_floor < tmp_ceil < X:
              low = ceil
          elif X < tmp_floor < tmp_ceil:
              high = floor
          elif tmp_floor < X < tmp_ceil:
              low = floor
              high = ceil
          elif X == tmp_floor:
              print(N)
              break
          elif X == tmp_ceil:
              print(N)
              break
  
problem_description: Statement
  
  Given is a string S representing the day of the week today.
  
  S is `SUN`, `MON`, `TUE`, `WED`, `THU`, `FRI`, or `SAT`, for Sunday, Monday,
  Tuesday, Wednesday, Thursday, Friday, and Saturday, respectively.
  
  After how many days is the next Sunday (tomorrow or later)?
samples: [{"input": "SAT", "output": "1\n    \n\nIt is Saturday today, and tomorrow will be Sunday.\n\n* * *"}, {"input": "SUN", "output": "7\n    \n\nIt is Sunday today, and seven days later, it will be Sunday again."}]