a=eval(input().replace(" ","|")) for i in range(1,a):a*=i print(a)