#include <iostream>

using namespace std;

int main() {
	int b, c;
	cin >> b >> c;
	while (c) {
		cout << b / (c - b) + 1 << endl;
		cin >> b >> c;
	}
	return 0;
}