#include using namespace std; using ll = long long; #define rep(i,m,n) for(int i=m; i> S >> N; rep(i, 0, N) S = shift(S); cout << S << endl; return 0; }