Problem:
Remainder of Big Integers

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

Input

Two integers $A$ and $B$ separated by a space character are given in a line.

Output

Print the remainder in a line.

Constraints

$0 \leq A, B \leq 10^{1000}$

$B \ne 0$

Sample Input 1

5 8

Sample Output 1

5

Sample Input 2

100 25

Sample Output 2

0

Solution in C# (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;

namespace Multiplication_of_Big_Integers_II
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            BigInteger[] nums = { BigInteger.Parse(input[0]), BigInteger.Parse(input[1]) };

            Console.WriteLine(nums[0] % nums[1]);
        }
    }
}