Bessie is a hungry cow. Each day, for dinner, if there is a haybale in the barn, she will eat one haybale. Farmer John does not want Bessie to starve, so some days he sends a delivery of haybales, which arrive in the morning (before dinner). In particular, on day d_i, Farmer John sends a delivery of b_i haybales (1≤d_i≤1014, 1≤b_i≤109).
Compute the total number of haybales Bessie will eat during the first T days.
The first line contains N and T (1≤N≤105, 1≤T≤1014).
The next N lines each contain d_i and b_i. It is additionally guaranteed that 1≤d_1\<d_2<⋯<d_N≤T.
Output the number of haybales that Bessie will eat during the first T days.
Note that the large size of integers involved in this problem may require the use of 64-bit integer data types (e.g., a "long long" in C/C++).