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