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