#include int main(void){ long int a,b; scanf("%ld%ld",&a,&b); printf("%ld\n",a^b); return 0; }