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))
ZGVmIHN0aWNrKE4sIEssIEwpOgogICIiIgogIENhbGN1bGF0ZXMgdGhlIGFyZWEgb2YgdGhlIHVuaW9uIG9mIE4gc3F1YXJlcy4KCiAgQXJnczoKICAgICAgTjogVGhlIG51bWJlciBvZiBzcXVhcmVzLgogICAgICBLOiBUaGUgc2lkZSBsZW5ndGggb2YgZWFjaCBzcXVhcmUuCiAgICAgIEw6IFRoZSBkaXN0YW5jZSBiZXR3ZWVuIHRoZSBib3R0b20tbGVmdCBjb3JuZXJzIG9mIGNvbnNlY3V0aXZlIHNxdWFyZXMuCgogIFJldHVybnM6CiAgICAgIFRoZSBhcmVhIG9mIHRoZSB1bmlvbiBvZiB0aGUgc3F1YXJlcy4KICAiIiIKCiAgIyBDYWxjdWxhdGUgdGhlIGFyZWEgb2YgZWFjaCBzcXVhcmUKICBzcXVhcmVfYXJlYSA9IEsgKiBLCgogICMgQ2FsY3VsYXRlIHRoZSBvdmVybGFwIGJldHdlZW4gY29uc2VjdXRpdmUgc3F1YXJlcwogIG92ZXJsYXAgPSAoSyAtIEwpICogKEsgLSBMKQoKICAjIENhbGN1bGF0ZSB0aGUgdG90YWwgYXJlYQogIHRvdGFsX2FyZWEgPSBOICogc3F1YXJlX2FyZWEgLSAoTiAtIDEpICogb3ZlcmxhcAoKICByZXR1cm4gdG90YWxfYXJlYQoKIyBSZWFkIGlucHV0Ck4sIEssIEwgPSBtYXAoaW50LCBpbnB1dCgpLnNwbGl0KCkpCgojIENhbGN1bGF0ZSBhbmQgcHJpbnQgdGhlIG91dHB1dApwcmludChzdGljayhOLCBLLCBMKSk=