xxx=input()
a=int(xxx.split(' ')[0])
b=int(xxx.split(' ')[1])
print(a % b)




1 int()变整数
2 split()分割
3 %取余数