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