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