Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func main() {
	scanner.Split(bufio.ScanWords)
	a := make([]int, 8)
	for i := 0; i < 8; i++ {
		a[i] = nextInt()
	}
	s := 0
	for i := 0; i < 4; i++ {
		s += a[i]
	}
	t := 0
	for i := 4; i < 8; i++ {
		t += a[i]
	}
	fmt.Println(max(s, t))
}

Python: A=raw_input()
S=0
X=0
for i in A:
    if(i==" "):
        S+=X
        X=0
    else:
        X*=10
        X+=int(i)
S+=X
B=raw_input()
T=0
Y=0
for i in B:
    if(i==" "):
        T+=Y
        Y=0
    else:
        Y*=10
        Y+=int(i)
T+=Y
if(S>T):
    print(S)
else:
    print(T)

Python: p0 = list(map(int,input().split()))
S = sum(p0)
p1 = list(map(int,input().split()))
T = sum(p1)
print(max(S,T))

Python: def main():
    a = list(map(int, input().split()))
    b = list(map(int, input().split()))
    aa = 0
    for x in range(len(a)):
        aa += a[x]
    bb = 0
    for x in range(len(b)):
        bb += b[x]
    if aa >= bb:
        print(aa)
    else:
        print(bb)


if __name__ == "__main__":
    main()

Python: A=list(map(int,input().split()))
B=list(map(int,input().split()))
print(max(sum(A),sum(B)))

Python: a = list(map(int, input().split()))
b = list(map(int, input().split()))

def sum(x):
    sum = 0
    for i in range(4):
        sum += x[i]
    return sum

A = sum(a)
B = sum(b)

print(A if A > B else B)

Python: print(max(sum(map(int, input().split())) for _ in range(2)))

Python: s = sum([int(i) for i in input().split()])
t = sum([int(i) for i in input().split()])

print(s) if s >= t else print(t)

C++: #include<iostream>
using namespace std;
int main(){
int a,b,c,d,e,f,g,h,i,j;
cin>>a>>b>>c>>d;
cin>>e>>f>>g>>h;
i=a+b+c+d;
j=e+f+g+h;
if(i>j){
    cout<<i<<endl;
}else{
    cout<<j<<endl;
}

}

C++: #include<iostream>
usingnamespase std;

int main(
	int a, b, c, d, e, f, g, h, s, t;
cin >> a >> b >> c >> d;
cin >> e >> f >> g >> h;

s = a + b + c + d;
t = e + f + g + h;

if (s > t) {
	cout << s << endl;
}
else {
	cout << t << endl;
}

	return 0;
)

C++: #include <iostream>
using namespace std;

int main() {
	int ajyo,asu,ari,aei,bjyo,bsu,bri,bei;
	cin>>ajyo>>asu>>ari>>aei>>bjyo>>bsu>>bri>>bei;
	if(ajyo+asu+ari+aei<bjyo+bsu+bri+bei){
		cout<<bjyo+bsu+bri+bei<<endl;
	}
	else if(ajyo+asu+ari+aei>bjyo+bsu+bri+bei){
		cout<<ajyo+asu+ari+aei<<endl;
	}
	else{
		cout<<bjyo+bsu+bri+bei<<endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;int S,T,a,i,j;
int main(){
for(j=0;j<4;j++){cin>>a;S+=a;}
for(j=0;j<4;j++){cin>>a;T+=a;}
cout<<max(S,T)<<endl;}

C++: #include <iostream>
using namespace std;

#define NUM 1000

int main(){
  int s[NUM];
  int t[NUM];
  int sums = 0;
  int sumt = 0;
  int i;

  for (i = 0; i < 4; i++){
    cin >> s[i];
    sums += s[i];
  }

  for (i = 0; i < 4; i++){
    cin >> t[i];
    sumt += t[i];
  }

  if (sums > sumt){
    cout << sums;
  }
  else {
    cout << sumt;
  }

return 0;

}

C++: #include<iostream>
#include<fstream>
using namespace std;
int main(){
	ifstream ifs( "input.txt" );
	int a,s=0,t=0;
	ofstream ofs( "output.txt" );
	for(int i=0;i<4;i++){
		ifs>>a;
		s+=a;
	}
	for(int i=0;i<4;i++){
		ifs>>a;
		t+=a;
	}
	ofs<<max(s,t)<<endl;
	
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int jou,suu,ri,ei,s;
	int jou2,suu2,ri2,ei2,t;
	scanf("%d %d %d %d",&jou,&suu,&ri,&ei);
	scanf("%d %d %d %d",&jou2,&suu2,&ri2,&ei2);
	s=jou+suu+ri+ei;
	t=jou2+suu2+ri2+ei2;
		if(s<t){
			printf("%d\n",t);
		}
		else if(s==t){
			printf("%d\n",s);
		}
		else{
			printf("%d\n",s);
		}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int a, b, c, d, ans[2];
	for (int i = 0; i < 2; i++)
	{
		cin >> a >> b >> c >> d;
		ans[i] = a + b + c + d;
	}
	if (ans[0] > ans[1])
	{
		cout << ans[0] << endl;
	}
	if (ans[0] < ans[1])
	{
		cout << ans[1] << endl;
	}
	if (ans[0] == ans[1])
	{
		cout << ans[0] << endl;
	}
}

C++: using namespace std;
int p[7];
int main(){
	for(int i=0;i<8;i++)cin>>p[i],p[i]+=(i>1&&i%4?p[i-1]:0);
	cout<<(p[3]>p[7]?p[3]:p[7])<<endl;
	return 0;
}

C++: #include<iostream>
#include<sstream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<map>
#include<numeric>

using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define repc(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(); it != array.end();++it)
#define repa(n,array) for(auto n :(array))

typedef long long ll ;
typedef vector<int> vi ;
typedef vector<ll> vl ;
//template<class Value>
//using dict = std::map< string, Value >;
typedef map<string,int> dict ;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
double eps = 1e-10 ;

template <typename T>
void out(vector < T > v)
{
  for(size_t i = 0; i < v.size(); i++)
  {
    debug(v[i]);
  }
}

template<typename T>
string ntos( T i ) {
  ostringstream s ;
  s << i ;
  return s.str() ;
}

template<typename T>
T ston(string str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a = 0,b = 0,num;
  rep(i,4){
    cin >> num;
    a += num;
  }
  rep(i,4){
    cin >> num;
    b += num;
  }
  if(a >= b){
    cout << a << endl;
  }
  else{
    cout << b << endl;
  }
  return 0;
}

C++: #include <stdio.h>
#include <math.h>
#include <algorithm>

using namespace std;

int main(){
	int a1,a2,a3,a4,b1,b2,b3,b4,A=0,B=0;
	scanf("%d %d %d %d",&a1,&a2,&a3,&a4);
	scanf("%d %d %d %d",&b1,&b2,&b3,&b4);
	A = a1 + a2 + a3 + a4;
	B = b1 + b2 + b3 + b4;
	if(A > B){
		printf("%d\n",A);
	}else{
		printf("%d\n",B);
	}

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T, class S> inline bool minup(T& m, S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, S x){ return m<(T)x ? (m=(T)x, true) : false; }

const int    INF = 1000000000;
const ll     MOD = 1000000007LL;
const double EPS = 1E-12;

const int MAX_N = 4;
const int n = MAX_N;

int main()
{
  while(true){
    int a[MAX_N], b[MAX_N];
    rep(i, n) if(!(cin >> a[i])) return 0;
    rep(i, n) if(!(cin >> b[i])) return 0;
    int sa = 0;
    int sb = 0;
    rep(i, n) sa += a[i];
    rep(i, n) sb += b[i];
    cout << max(sa, sb) << endl;
  }

  return 0;
}