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