a,b=map(int,input().split()) print(a%b)
CZOJ 계정으로 가입하면 CZOJ로 제공되는 모든 OJ를 이용하고 참여하실 수 있습니다.
CZOJ 공용 계정을 사용