#include #include using namespace std; int main(){ string N,M; int n,m,ans; cin >> N >> M; n = (int)N[N.length()-1]-48; m = (int)M[M.length()-1]-48; if(M == "1") ans = n; else{ ans = n; for(int i=1;i