#include using namespace std; #define int long long signed main(){ int A,B; cin>>A>>B; int N = 0; for(int i=1;i<=1e9;i++){ N = A*N+B; if(!N){ cout<