#include<iostream> using namespace std; int main(){ float a,b; cin>>a>>b; printf("%.2lf",a-int(a/b)*b); return 0; }