import java.util.Scanner; class no581{ public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); long a,c; a=stdIn.nextLong(); c=stdIn.nextLong(); System.out.print(a^c); } }