#include<iostream> using namespace std; int main(){ double a,b,r; cin>>a>>b; r=a%b; cout<<fixed<<setpresion(4)<<r; return 0; }