integer_value = 23
integer_value2 = 32
integer_value=int(input())
integer_value2=int(input())
bit_string = bin(integer_value)[2:]
bit_string2 = bin(integer_value2)[2:]
out=""
# print(bit_string)
# print(bit_string2)
while len(bit_string)<len(bit_string2):
    bit_string=" "+bit_string;
while len(bit_string2)<len(bit_string):
    bit_string2=" "+bit_string2;

# print(bit_string)
# print(bit_string2)
for i in range(len(bit_string)):
    tmp=" ";
    if(bit_string[i]==bit_string2[i]):
        tmp="1"
    else:
        tmp="0"
    if bit_string[i]==" ":
        tmp=bit_string2[i]
    if bit_string2[i]==" ":
        tmp=bit_string[i]
    out+=tmp
# print(out)
print(integer_value | integer_value2)