def solve_stick(N, K, L):
# If there's only one square
if N == 1:
# Return the area of a single square
return 4 * L * L
# Check if squares overlap
# Distance between centers of consecutive squares is K
# Each square has side length 2L
if K <= 2 * L:
# Squares overlap or touch
# Calculate the total length covered
total_length = (N - 1) * K + 2 * L
# Area will be total_length × (width of squares)
return total_length * 2 * L
else:
# Squares don't overlap
# Simply multiply area of one square by number of squares
return N * 4 * L * L
def main():
# Read input
N, K, L = map(int, input().split())
# Calculate and print result
result = solve_stick(N, K, L)
print(result)
if __name__ == "__main__":
main()
ZGVmIHNvbHZlX3N0aWNrKE4sIEssIEwpOgogICAgIyBJZiB0aGVyZSdzIG9ubHkgb25lIHNxdWFyZQogICAgaWYgTiA9PSAxOgogICAgICAgICMgUmV0dXJuIHRoZSBhcmVhIG9mIGEgc2luZ2xlIHNxdWFyZQogICAgICAgIHJldHVybiA0ICogTCAqIEwKICAgIAogICAgIyBDaGVjayBpZiBzcXVhcmVzIG92ZXJsYXAKICAgICMgRGlzdGFuY2UgYmV0d2VlbiBjZW50ZXJzIG9mIGNvbnNlY3V0aXZlIHNxdWFyZXMgaXMgSwogICAgIyBFYWNoIHNxdWFyZSBoYXMgc2lkZSBsZW5ndGggMkwKICAgIGlmIEsgPD0gMiAqIEw6CiAgICAgICAgIyBTcXVhcmVzIG92ZXJsYXAgb3IgdG91Y2gKICAgICAgICAjIENhbGN1bGF0ZSB0aGUgdG90YWwgbGVuZ3RoIGNvdmVyZWQKICAgICAgICB0b3RhbF9sZW5ndGggPSAoTiAtIDEpICogSyArIDIgKiBMCiAgICAgICAgIyBBcmVhIHdpbGwgYmUgdG90YWxfbGVuZ3RoIMOXICh3aWR0aCBvZiBzcXVhcmVzKQogICAgICAgIHJldHVybiB0b3RhbF9sZW5ndGggKiAyICogTAogICAgZWxzZToKICAgICAgICAjIFNxdWFyZXMgZG9uJ3Qgb3ZlcmxhcAogICAgICAgICMgU2ltcGx5IG11bHRpcGx5IGFyZWEgb2Ygb25lIHNxdWFyZSBieSBudW1i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