A large agricultural corporation is undertaking an audit of its N land properties. As a first step, they would like to know the total area of their properties. Each property has a rectangular shape, and no two properties overlap. You realize that this is a trivial calculation, but you understand that you need to solve this problem in order to test your ability to properly handle large amounts of data and large numbers under the IOI 2009 contest system.
Write a program that, given the dimensions of the N
land properties, determines the sum of their areas.
|1 ≤ N ≤ 500,000||The number of land properties|
|1 ≤ Ak, Bk ≤ 20,000||The lengths of the sides of property k|
Your program should read from the standard input the following data:
- The first line contains a single integer: the number of properties N.
- The next N lines describe the properties, one property per line. The kth of these lines describes property number k and it contains two integers separated by a single space: the lengths of the sides of the property Ak and Bk measured in meters.
Your program should write to the standard output a single line containing a single integer: the total area of all properties, measured in square meters.
Sample Input 1
Sample Output 1