Farmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes formed by the rectangular buildings.
The entire horizon is represented by a number line with buildings. Building 's silhouette has a base that spans locations through along the horizon and has height . Determine the area, in square units, of the aggregate silhouette formed by all buildings.
The first line contains a single integer . Each of the next lines describes building with three integers: and .
Print the total area, in square units, of the silhouettes formed by all buildings.