output_description: Print the number of possible values of S - T.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N X D
attempt: n, x, d = map(int, input().split())
  a = [x]
  for i in range(1, n):
      a.append(a[i - 1] + d)
  # print(a)
  diflist = []
  for i in range(2 ** (n - 1)):
      s = 0
      t = 0
      roopi = i
      for j in range(n):
          if roopi % 2 == 0:
              s += a[j]
          else:
              t += a[j]
          roopi = roopi >> 1
      if (s - t) not in diflist:
          diflist.append(s - t)
          diflist.append(t - s)
  print(len(diflist))
  
problem_description: Statement
  
  We have an integer sequence A of length N, where A_1 = X, A_{i+1} = A_i + D (1
  \leq i < N ) holds.
  
  Takahashi will take some (possibly all or none) of the elements in this
  sequence, and Aoki will take all of the others.
  
  Let S and T be the sum of the numbers taken by Takahashi and Aoki,
  respectively. How many possible values of S - T are there?
samples: [{"input": "3 4 2", "output": "8\n    \n\nA is (4, 6, 8).\n\nThere are eight ways for (Takahashi, Aoki) to take the elements: ((), (4, 6,\n8)), ((4), (6, 8)), ((6), (4, 8)), ((8), (4, 6))), ((4, 6), (8))), ((4, 8),\n(6))), ((6, 8), (4))), and ((4, 6, 8), ()).\n\nThe values of S - T in these ways are -18, -10, -6, -2, 2, 6, 10, and 18,\nrespectively, so there are eight possible values of S - T.\n\n* * *"}, {"input": "2 3 -3", "output": "2\n    \n\nA is (3, 0). There are two possible values of S - T: -3 and 3.\n\n* * *"}, {"input": "100 14 20", "output": "49805"}]