It has been decided that a programming contest sponsored by company A will be held, so we will post the notice on a bulletin board.  The bulletin board is in the form of a grid with N rows and N columns, and the notice will occupy a rectangular region with H rows and W columns.  How many ways are there to choose where to put the notice so that it completely covers exactly HW squares?
n=int(input())
h=int(input())
w=int(input())
print((n-h)*(n-w))
n=int(input())
h=int(input())
w=int(input())
print((n-h+1)*(n-w+1))