main(){long long a,c;scanf("%lld%lld",&a,&c);printf("%lld\n",a^c);}