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