#include<iostream> using namespace std; int main(){ double a,b; int k; cin>>a>>b; k = a/b; printf("%.2lf\n",a-b*k); }