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