def calculate_area(n, k, l):
"""Calculates the area of the union of squares.
Args:
n: The number of squares.
k: The length of the side of each square.
l: The spacing between the squares.
Returns:
The area of the union of squares.
"""
total_area = 0
for i in range(n):
# Calculate the coordinates of the bottom-left corner of the square
x = i * (k + l)
y = i * (k + l)
# Calculate the area of the square
square_area = k * k
# Add the area of the square to the total area
total_area += square_area
return total_area
# Get the input from the user
n, k, l = map(int, input().split())
# Calculate the area of the union of squares
area = calculate_area(n, k, l)
# Print the output
print(area)
ZGVmIGNhbGN1bGF0ZV9hcmVhKG4sIGssIGwpOgogICIiIkNhbGN1bGF0ZXMgdGhlIGFyZWEgb2YgdGhlIHVuaW9uIG9mIHNxdWFyZXMuCgogIEFyZ3M6CiAgICBuOiBUaGUgbnVtYmVyIG9mIHNxdWFyZXMuCiAgICBrOiBUaGUgbGVuZ3RoIG9mIHRoZSBzaWRlIG9mIGVhY2ggc3F1YXJlLgogICAgbDogVGhlIHNwYWNpbmcgYmV0d2VlbiB0aGUgc3F1YXJlcy4KCiAgUmV0dXJuczoKICAgIFRoZSBhcmVhIG9mIHRoZSB1bmlvbiBvZiBzcXVhcmVzLgogICIiIgoKICB0b3RhbF9hcmVhID0gMAogIGZvciBpIGluIHJhbmdlKG4pOgogICAgIyBDYWxjdWxhdGUgdGhlIGNvb3JkaW5hdGVzIG9mIHRoZSBib3R0b20tbGVmdCBjb3JuZXIgb2YgdGhlIHNxdWFyZQogICAgeCA9IGkgKiAoayArIGwpCiAgICB5ID0gaSAqIChrICsgbCkKCiAgICAjIENhbGN1bGF0ZSB0aGUgYXJlYSBvZiB0aGUgc3F1YXJlCiAgICBzcXVhcmVfYXJlYSA9IGsgKiBrCgogICAgIyBBZGQgdGhlIGFyZWEgb2YgdGhlIHNxdWFyZSB0byB0aGUgdG90YWwgYXJlYQogICAgdG90YWxfYXJlYSArPSBzcXVhcmVfYXJlYQoKICByZXR1cm4gdG90YWxfYXJlYQoKIyBHZXQgdGhlIGlucHV0IGZyb20gdGhlIHVzZXIKbiwgaywgbCA9IG1hcChpbnQsIGlucHV0KCkuc3BsaXQoKSkKCiMgQ2FsY3VsYXRlIHRoZSBhcmVhIG9mIHRoZSB1bmlvbiBvZiBzcXVhcmVzCmFyZWEgPSBjYWxjdWxhdGVfYXJlYShuLCBrLCBsKQoKIyBQcmludCB0aGUgb3V0cHV0CnByaW50KGFyZWEp