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