#include using namespace std; #ifdef _RUTHEN #include #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); ll A, B; cin >> A >> B; // Ax+B=x // (A-1)x=B if (A == 1) { assert(B == 0); cout << 0 << '\n'; } else { cout << B / (A - 1) << '\n'; } return 0; }