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