output_description: Print the number of the positive integers N such that rev(N) = N + D.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      D
attempt: D = int(input())
  ans = 0
  for i in range(1000000):
      if int(str(i)[::-1]) == i + D:
          ans += 1
  print(ans)
  
problem_description: Statement
  
  For a positive integer n, we denote the integer obtained by reversing the
  decimal notation of n (without leading zeroes) by rev(n). For example,
  rev(123) = 321 and rev(4000) = 4.
  
  You are given a positive integer D. How many positive integers N satisfy
  rev(N) = N + D?
samples: [{"input": "63", "output": "2\n    \n\nThere are two positive integers N such that rev(N) = N + 63: N = 18 and 29.\n\n* * *"}, {"input": "75", "output": "0\n    \n\nThere are no positive integers N such that rev(N) = N + 75.\n\n* * *"}, {"input": "864197532", "output": "1920"}]