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()