AT_awc0004_b バッテリー残量

Description

Takahashi is developing a system to monitor the charging status of $ N $ smartphones. At time $ 0 $ , the battery level of each smartphone $ i $ ( $ 1 \leq i \leq N $ ) is $ A_i $ mAh. Each smartphone $ i $ consumes battery at a constant rate of $ B_i $ mAh/s from time $ 0 $ onwards. However, the battery level does not go below $ 0 $ mAh. That is, the battery level of smartphone $ i $ at time $ t $ ( $ t \geq 0 $ ) is $ \max(A_i - B_i \times t,\ 0) $ mAh. Find the total battery level of all $ N $ smartphones at time $ T $ .

Input Format

> $ N $ $ T $ $ A_1 $ $ B_1 $ $ A_2 $ $ B_2 $ $ \vdots $ $ A_N $ $ B_N $ - The first line contains an integer $ N $ representing the number of smartphones and an integer $ T $ representing the time at which to calculate the total battery level, separated by a space. - Lines $ 2 $ through $ N+1 $ give the information for each smartphone. - Line $ 1 + i $ contains an integer $ A_i $ representing the initial battery level of smartphone $ i $ and an integer $ B_i $ representing the battery consumption per second, separated by a space.

Output Format

Output the total battery level of all smartphones at time $ T $ as an integer on a single line.

Explanation/Hint

### Constraints - $ 1 \leq N \leq 2 \times 10^5 $ - $ 1 \leq T \leq 10^9 $ - $ 1 \leq A_i \leq 10^9 $ - $ 1 \leq B_i \leq 10^9 $ - All inputs are integers