Piece of Cake!

Time limit1sMemory limit512 MB

Summary
Given a square cake of side n and thickness 4, two cuts at distances h and v from the top and left, find the largest piece's volume.
Level

Easy2 of 10

Topics
Math, Implementation, Brute force
Solved
No attempts yet

Problem

It is Greg's birthday! To celebrate, his friend Sam invites Greg and two other friends for a small party. Of course, every birthday party must have cake.

Sam ordered a square cake. She makes a single horizontal cut and a single vertical cut. In her excitement to eat cake, Sam forgot to make these cuts through the middle of the cake.

Of course, the biggest piece of cake should go to Greg since it is his birthday. Help Sam determine the volume of the biggest piece of cake that resulted from these two cuts.

Input

The input consists of a single line containing three integers n (2 ≤ n ≤ 10 000), the length of the sides of the square cake in centimeters, h (0 < h < n), the distance of the horizontal cut from the top edge of the cake in centimeters, and v (0 < v < n), the distance of the vertical cut from the left edge of the cake in centimeters. This is illustrated in the figure above.

Each cake is 4 centimeters thick.

Output

Display the volume (in cubic centimeters) of the largest of the four pieces of cake after the horizontal and vertical cuts are made.

Examples3

  1. Example 1

    Input
    10 4 7
    
    Expected output
    168
    
  2. Example 2

    Input
    5 2 2
    
    Expected output
    36
    
  3. Example 3

    Input
    4 2 1
    
    Expected output
    24