Farmer John has arrived in the city with his cows! During sunset, the cows look at the city skyline and observe beautiful silhouettes formed by rectangular buildings.
The entire skyline is represented by a number line with buildings. The silhouette of the -th building extends along the horizon between points a_i and b_i and has height h_i. Determine the total area (in square units) of the silhouette formed by all buildings.
The first line contains an integer n~(1 \le n \le 40000). Each of the next lines describes the -th building with three integers: a_i, b_i~(1 \le a_i < b_i \le 10^9) and h_i~(1 \le h_i \le 10^9).
Print the total area of the city skyline (in square units) formed by all buildings.

Example 1