#include<iostream> using namespace std; int main() { int n;long int k; cin>>n>>k; cout<<n/k+n<<endl; return 0; }