#include <iostream>
#include <cmath>
int main()
{
int a, b;
std::cin >> std::hex >> a >> b;
std::cout << std::hex << std::abs(b-a) << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CgppbnQgbWFpbigpCnsKICAgIGludCBhLCBiOwogICAgc3RkOjpjaW4gPj4gc3RkOjpoZXggPj4gYSA+PiBiOwogICAgc3RkOjpjb3V0IDw8IHN0ZDo6aGV4IDw8IHN0ZDo6YWJzKGItYSkgPDwgc3RkOjplbmRsOwp9