A warehouse ships boxes on a truck that can carry at most T boxes in total. There are m box types; type i has count[i] identical boxes available, and every box of that type holds units[i] units of goods. You may load any boxes you like, from any types, up to the T-box limit.
Return the maximum total number of units you can load.
Input format
Line 1: two integers m and T — the number of box types and the truck's box capacity.
Line 2 .. m+1: each line has two integers count[i] and units[i] for one box type.
Output format
A single integer: the maximum total units that can be loaded without exceeding T boxes.
Constraints
- 1 <= m <= 100000
- 0 <= T <= 1000000000
- 1 <= count[i] <= 10000
- 0 <= units[i] <= 10000