#include #include int main(){ std::string S, T; std::cin >> S >> T; while(T.size() < 3){ T = '0' + T; } int n = S[S.size()-1] - '0', m = (T[T.size()-3]-'0') * 100 + (T[T.size()-2]-'0') * 10 + (T[T.size()-1]-'0'); // printf("%d %d\n", n, m); if(m == 0){ std::cout << 1 << std::endl; }else{ int res = 1; for(int i=0;i