#include <bits/stdc++.h> using namespace std; #define ALL(a) (a).begin(),(a).end() #define rALL(a) (a).rbegin(),(a).rend() typedef pair<int, int> Pint; typedef pair<int64_t, int64_t> Pll; typedef int64_t ll; int main() { int a, b, c, d; cin >> a >> b >> a >> b >> c >> d; cout << abs(a - c) + abs(b - d) << endl; }