A,B=(map(int,input().split())) print((A or B)+(A and B))