#include using namespace std; int main() { int s,k; cin>>s>>k; while(s>=k) s-=k; cout<