Calculate x mod m
Given a very large integer
x
that has up to a million digits, you are asked to calculate the remainder when divided by m
. Input
The first line of the input contains the integer
x
(1 ≤ |x| ≤ ).The second line contains the integer
m
(1 ≤ m ≤ ). Output
The program should print the result of
. Examples
Input | Output |
14512432
11 | 0 |
1245435345234
54 | 18 |
Constraints
Time limit: 1 seconds
Memory limit: 512 MB
Output limit: 1 MB