#!/usr/bin/env python3 # -*- coding: utf-8 -*- def main(): A, B = map(int, input().split()) ans = A ^ B print(ans) if __name__ == "__main__": main()