output_description: For each input number, output a line containing the number of 11-sequences.
  
  You can assume the answer fits in a 32-bit signed integer.
input_description: The input is a sequence of lines each of which contains a number consisting of
  less than or equal to 80000 digits.
  
  The end of the input is indicated by a line containing a single zero, which
  should not be processed.
attempt: targ = input()
  while True:
      ans = 0
      length = len(targ)
      for o in range(length - 1):
          disp = [0 for n in range(length)]
          for i in range(o + 1, length):
              if targ[o] == "0":
                  disp[i] = ans
              elif i == length - 1:
                  disp[i] = (
                      int((int(targ[o] + targ[o + 1 : i + 1])) % 11 == 0)
                      + disp[i - 1]
                      + ans
                  )
              else:
                  disp[i] = (
                      int((int(targ[o] + targ[o + 1 : i + 1])) % 11 == 0) + disp[i - 1]
                  )
          ans = disp[-1]
          del disp
      print(ans)
      targ = input()
      if targ == "0":
          break
  
problem_description: H: Eleven Lover
  
  Edward Leven loves multiples of eleven very much. When he sees a number, he
  always tries to find consecutive subsequences (or substrings) forming
  multiples of eleven. He calls such subsequences as 11-sequences. For example,
  he can find an 11-sequence 781 in a number 17819.
  
  He thinks a number which has many 11-sequences is a _good_ number. He would
  like to find out a very _good_ number. As the first step, he wants an easy way
  to count how many 11-sequences are there in a given number. Even for him,
  counting them from a big number is not easy. Fortunately, one of his friends,
  you, is a brilliant programmer. He asks you to write a program to count the
  number of 11-sequences. Note that an 11-sequence must be a positive number
  without leading zeros.
samples: [{"input": "1111\n    11011\n    1234567891011121314151617181920\n    0", "output": "4\n    4\n    38"}]