#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); // x // Ax + B = x // (A - 1) x = -B // x = -B / (A-1) ll A,B; cin >> A >> B; if(A == 1LL) { assert(B == 0); cout << 1 << endl; } else { cout << -B / (A - 1) << endl; } }