input: Write a function to calculate the sum of the series x + (x-1) + (x-2) + ... + 1.
  assert functionA(5) == 15
  assert functionA(10) == 55
  assert functionA(1) == 1
output: def functionA(x):
      return x * (x + 1) // 2