#include int main(void){ int a, b, c; scanf("%d%d", &a, &c); b = a ^ c; printf("%d\n", b); }