# 電車なう(スマホコーディング) m=998244353 print(m) a,n=map(int,input().split()) print(pow(a,n,m))