n = int(input()) x = [] y = [] for i in range(n): xi,yi = map(int,input().split()) x.append(xi) y.append(yi) x.sort() y.sort() if n%2 == 1: cx = x[n//2] cy = y[n//2] ans = 0 for i in range(n): ans += abs(x[i]-cx)+abs(y[i]-cy) print(int(ans)) else: cx = (x[n//2-1]+x[n//2])/2 cy = (y[n//2-1]+y[n//2])/2 ans = 0 for i in range(n): ans += abs(x[i]-cx)+abs(y[i]-cy) print(int(ans))