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