#include<bits/stdc++.h> using namespace std; int main(){ double x,y,r; int q; cin>>x>>y; q=x/y; r=x-q*y; printf("%.2lf",r); return 0; }