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