# -*- coding: utf-8 -*- a,c = map(int,input().split()) print(a^c)