#D3662. Remainder of Big Integers

    ID: 3038 Type: Default 1000ms 268MiB

Remainder of Big Integers

Remainder of Big Integers

Remainder of Big Integers

Given two integers AA and BB, compute the remainder of AB\frac{A}{B}.

Input

Two integers AA and BB separated by a space character are given in a line.

Output

Print the remainder in a line.

Constraints

  • 0A,B1010000 \leq A, B \leq 10^{1000}
  • B0B \ne 0

Sample Input 1

5 8

Sample Output 1

5

Sample Input 2

100 25

Sample Output 2

0

Example

Input

5 8

Output

5

inputFormat

Input

Two integers AA and BB separated by a space character are given in a line.

outputFormat

Output

Print the remainder in a line.

Constraints

  • 0A,B1010000 \leq A, B \leq 10^{1000}
  • B0B \ne 0

Sample Input 1

5 8

Sample Output 1

5

Sample Input 2

100 25

Sample Output 2

0

Example

Input

5 8

Output

5

样例

5 8
5