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