output_description: Print the number of pairs of integers (i,j) (1 ≤ i ≤ j ≤ |S|) that satisfy the
  condition.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: a, lists, count = str(input()), [], 0
  for x in a:
      if x == "0":
          count += 1
  for i in range(0, len(a) - 4):
      lists.append(a[i] + a[i + 1] + a[i + 2] + a[i + 3])
  for i in range(0, len(a) - 5):
      lists.append(a[i] + a[i + 1] + a[i + 2] + a[i + 3] + a[i + 4])
  for i in range(0, len(a) - 6):
      lists.append(a[i] + a[i + 1] + a[i + 2] + a[i + 3] + a[i + 4] + a[i + 5])
  for i in range(0, len(a) - 7):
      lists.append(a[i] + a[i + 1] + a[i + 2] + a[i + 3] + a[i + 4] + a[i + 5] + a[i + 6])
  for i in range(0, len(a) - 8):
      lists.append(
          a[i]
          + a[i + 1]
          + a[i + 2]
          + a[i + 3]
          + a[i + 4]
          + a[i + 5]
          + a[i + 6]
          + a[i + 7]
      )
  for x in lists:
      if int(x) % 2019 == 0:
          count += 1
  print(count)
  
problem_description: Statement
  
  Given is a string S consisting of digits from `1` through `9`.
  
  Find the number of pairs of integers (i,j) (1 ≤ i ≤ j ≤ |S|) that satisfy the
  following condition:
  
  Condition: In base ten, the i-th through j-th characters of S form an integer
  that is a multiple of 2019.
samples: [{"input": "1817181712114", "output": "3\n    \n\nThree pairs - (1,5), (5,9), and (9,13) \\- satisfy the condition.\n\n* * *"}, {"input": "14282668646", "output": "2\n    \n\n* * *"}, {"input": "2119", "output": "0\n    \n\nNo pairs satisfy the condition."}]