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