#include <iostream>
#include <stdio.h>
#include <vector>
//#include <windows.h>

#define ll long long

typedef struct{
	int x, y;
} point_t;

point_t point_init(int x, int y){
	point_t result;
	result.x = x;
	result.y = y;
	return result;
}

int compute(point_t p1, point_t p2){
	int x_diff = p1.x > p2.x ? p1.x - p2.x : p2.x - p1.x;
	int y_diff = p1.y > p2.y ? p1.y - p2.y : p2.y - p1.y;
	return x_diff + y_diff;
}

int abs(int n){
	if(n < 0) return -n;
	return n;
}

int main(){
	int N;
	scanf("%d", &N);
	ll result = 0;
	std::vector<point_t> points(N);
	for(int i = 0; i < N; i++){
		int x, y;
		scanf("%d %d", &x, &y);
		points[i] = point_init(x, y);
	}
	for(int i = 0; i < N; i++){
		for(int j = 0; j < N; j++){
			if(j == i) continue;
			result += abs(compute(points[i], points[j]));
			//printf("point %d to %d = %d\n", i, j, abs(compute(points[i], points[j])));
		}
	}
	printf("%lld", result);
	//system("pause");
	return 0;
}
