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