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