#fake n=int(input()) a=list(map(int,input().split())) k=0 while 2**(k+1)<=max(a):k+=1 print(2**k%998244353)