C#
using System;
using System.IO;
namespace ff
{
class Program
{
static void Main(string[] args)
{
string[] temp = File.ReadAllText("input.txt").Split(' ');
int k = Convert.ToInt32(temp[0]);
int n = Convert.ToInt32(temp[1]);
File.WriteAllText("output.txt", Convert.ToString(k % n));
}
}
}