#include <iostream>
using namespace std;
int main() {
int n, res = 0;
cin >> n;
for (int tmp, i = 0; i < n; i++) {
cin >> tmp;
res -= tmp;
}
for (int tmp, i = 0; i < n; i++) {
cin >> tmp;
res += tmp;
}
cout << res;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgbWFpbigpIHsKICAgIGludCBuLCByZXMgPSAwOwogICAgY2luID4+IG47CiAgICBmb3IgKGludCB0bXAsIGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgY2luID4+IHRtcDsKICAgICAgICByZXMgLT0gdG1wOwogICAgfQogICAgZm9yIChpbnQgdG1wLCBpID0gMDsgaSA8IG47IGkrKykgewogICAgICAgIGNpbiA+PiB0bXA7CiAgICAgICAgcmVzICs9IHRtcDsKICAgIH0KICAgIGNvdXQgPDwgcmVzOwogICAgcmV0dXJuIDA7Cn0K