#include int main(void){ long a, c; scanf( "%ld %ld", &a, &c ); printf( "%ld", a ^ c ); }