import std; void main() { long N; readf("%d\n", N); auto A = readln.chomp.split.to!(long[]); auto B = readln.chomp.split.to!(long[]); auto X = readln.chomp.split.to!(long[]); auto Y = readln.chomp.split.to!(long[]); long res; foreach (i; 0 .. N) { long p = i * 2, q = i * 2 + 1; res += max(A[p]+A[q]+X[i], A[p]+B[q]+Y[i], B[p]+A[q]+Y[i], B[p]+B[q]+X[i]); } res.writeln; }