#include <iostream>
using namespace std;
int main()
{
int size, a;
cin >> size;
long *arr1 = new long[size];
long *arr2 = new long[size];
for(int i = 0; i < size; i++){
cin >> arr1[i];
}
for(int i = 0; i < size; i++){
cin >> arr2[i];
}
long tmp = 0;
for(int i = 0; i < size; i++){
tmp+= abs(arr2[i] - arr1[i]);
}
cout << tmp/2;
delete []arr1;
delete []arr2;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkKewogICAgaW50IHNpemUsIGE7CiAgICBjaW4gPj4gc2l6ZTsKCiAgICBsb25nICphcnIxID0gbmV3IGxvbmdbc2l6ZV07CiAgICBsb25nICphcnIyID0gbmV3IGxvbmdbc2l6ZV07CiAgICBmb3IoaW50IGkgPSAwOyBpIDwgc2l6ZTsgaSsrKXsKICAgICAgICBjaW4gPj4gYXJyMVtpXTsKICAgIH0KICAgIGZvcihpbnQgaSA9IDA7IGkgPCBzaXplOyBpKyspewogICAgICAgIGNpbiA+PiBhcnIyW2ldOwogICAgfQogICAgbG9uZyB0bXAgPSAwOwogICAgZm9yKGludCBpID0gMDsgaSA8IHNpemU7IGkrKyl7CiAgICAgICAgdG1wKz0gYWJzKGFycjJbaV0gLSBhcnIxW2ldKTsKICAgICAgICB9CiAgICBjb3V0IDw8IHRtcC8yOwogICAgZGVsZXRlIFtdYXJyMTsKICAgIGRlbGV0ZSBbXWFycjI7CiAgICByZXR1cm4gMDsKfQ==