Hungry Cow

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

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_id\_i, Farmer John sends a delivery of b_ib\_i haybales (1d_i10141\leq d\_i \leq 10^{14}, 1b_i1091 \leq b\_i \leq 10^9).

Compute the total number of haybales Bessie will eat during the first TT days.

입력

The first line contains NN and TT (1N1051 \le N \le 10^5, 1T10141 \le T \le 10^{14}).

The next NN lines each contain d_id\_i and b_ib\_i. It is additionally guaranteed that 1d_1\<d_2<<d_NT1\le d\_1\<d\_2<\dots < d\_N\le T.

출력

Output the number of haybales that Bessie will eat during the first TT 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++).