#include<bits/stdc++.h> using namespace std; int main(){ int n,k,c,s; cin>>n>>k; s=n%k; c=n-s; cout<<c; return 0; }