#include using namespace std; int main(void){ int n; cin >> n; vector X(n), Y(n); int Xsum = 0, Ysum = 0; for (int i = 0; i < n; i++) { cin >> X[i] >> Y[i]; Xsum += X[i]; Ysum += Y[i]; } int Xavr = Xsum / n, Yavr = Ysum / n; int sum = 0; for (int i = 0; i < n; i++) { sum += abs(X[i]-Xavr) + abs(Y[i] - Yavr); } cout << sum << endl; }