#abc273b. [abc273_b]Broken Rounding
[abc273_b]Broken Rounding
Problem Statement
Given a non-negative integer , perform the following operation for in this order and find the resulting .
- Round off to the nearest .
- Formally, replace with that is "the largest multiple of that minimizes ."
- Here are some examples:
- Rounding off to the nearest yields .
- Rounding off to the nearest yields .
- Rounding off to the nearest yields .
- Rounding off to the nearest yields .
Constraints
- and are integers.
Input
The input is given from Standard Input in the following format:
Output
Print the answer as an integer.
Sample Input 1
2048 2
Sample Output 1
2100
changes as by the operations.
Sample Input 2
1 15
Sample Output 2
0
Sample Input 3
999 3
Sample Output 3
1000
Sample Input 4
314159265358979 12
Sample Output 4
314000000000000
may not fit into a -bit integer type.