#-*- coding:utf-8 -*- if __name__ == "__main__": A, C = list(map(int, input().split())) print(A^C)