#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{
	int D, L;
	cin >> D >> L;

	if (D % L == 0) cout << D / L << endl;
	else
	{
		int t = D - L * (D / L);
		cout << (D / L) + t << endl;
	}

	return 0;
}
