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