def stick(N, K, L):
  """
  Calculates the area of the union of N squares.

  Args:
      N: The number of squares.
      K: The side length of each square.
      L: The distance between the bottom-left corners of consecutive squares.

  Returns:
      The area of the union of the squares.
  """

  # Calculate the area of each square
  square_area = K * K

  # Calculate the overlap between consecutive squares
  overlap = (K - L) * (K - L)

  # Calculate the total area
  total_area = N * square_area - (N - 1) * overlap

  return total_area

# Read input
N, K, L = map(int, input().split())

# Calculate and print the output
print(stick(N, K, L))