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