def solve(N, K, L):
# If there's only one square
if N == 1:
return 4 * L * L
# Calculate coordinates for each square and find max and min points
min_x = min_y = float('inf')
max_x = max_y = float('-inf')
for i in range(N):
# Bottom-left corner
x1, y1 = i * K - L, i * K - L
# Top-right corner
x2, y2 = i * K + L, i * K + L
min_x = min(min_x, x1)
min_y = min(min_y, y1)
max_x = max(max_x, x2)
max_y = max(max_y, y2)
# Calculate area of the bounding rectangle
width = max_x - min_x
height = max_y - min_y
return width * height
def main():
# Read input
N, K, L = map(int, input().split())
# Calculate and output result
result = solve(N, K, L)
print(result)
if __name__ == "__main__":
main()
ZGVmIHNvbHZlKE4sIEssIEwpOgogICAgIyBJZiB0aGVyZSdzIG9ubHkgb25lIHNxdWFyZQogICAgaWYgTiA9PSAxOgogICAgICAgIHJldHVybiA0ICogTCAqIEwKICAgIAogICAgIyBDYWxjdWxhdGUgY29vcmRpbmF0ZXMgZm9yIGVhY2ggc3F1YXJlIGFuZCBmaW5kIG1heCBhbmQgbWluIHBvaW50cwogICAgbWluX3ggPSBtaW5feSA9IGZsb2F0KCdpbmYnKQogICAgbWF4X3ggPSBtYXhfeSA9IGZsb2F0KCctaW5mJykKICAgIAogICAgZm9yIGkgaW4gcmFuZ2UoTik6CiAgICAgICAgIyBCb3R0b20tbGVmdCBjb3JuZXIKICAgICAgICB4MSwgeTEgPSBpICogSyAtIEwsIGkgKiBLIC0gTAogICAgICAgICMgVG9wLXJpZ2h0IGNvcm5lcgogICAgICAgIHgyLCB5MiA9IGkgKiBLICsgTCwgaSAqIEsgKyBMCiAgICAgICAgCiAgICAgICAgbWluX3ggPSBtaW4obWluX3gsIHgxKQogICAgICAgIG1pbl95ID0gbWluKG1pbl95LCB5MSkKICAgICAgICBtYXhfeCA9IG1heChtYXhfeCwgeDIpCiAgICAgICAgbWF4X3kgPSBtYXgobWF4X3ksIHkyKQogICAgCiAgICAjIENhbGN1bGF0ZSBhcmVhIG9mIHRoZSBib3VuZGluZyByZWN0YW5nbGUKICAgIHdpZHRoID0gbWF4X3ggLSBtaW5feAogICAgaGVpZ2h0ID0gbWF4X3kgLSBtaW5feQogICAgcmV0dXJuIHdpZHRoICogaGVpZ2h0CgpkZWYgbWFpbigpOgogICAgIyBSZWFkIGlucHV0CiAgICBOLCBLLCBMID0gbWFwKGludCwgaW5wdXQoKS5zcGxpdCgpKQogICAgCiAgICAjIENhbGN1bGF0ZSBhbmQgb3V0cHV0IHJlc3VsdAogICAgcmVzdWx0ID0gc29sdmUoTiwgSywgTCkKICAgIHByaW50KHJlc3VsdCkKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICBtYWluKCk=