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