a,b=list( map(int,input().split(" ")) ) print(a+b if a!=4 and b!=1 else 0)