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))
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
#define ll long long
#define ull unsigned ll
typedef long double ld;
#define ALL(a) (a).begin(),(a).end()
#define ifnot(a) if(not a)
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

void reader(int &a) { scanf("%d", &a); }
void reader(double &a) { scanf("%lf", &a); }
void reader(char a[]) { scanf("%s", a); }
void reader(char &a) { scanf(" %c", &a); }
void reader(ll &a) { scanf("%lld", &a); }
void reader(ull &a) { scanf("%llu", &a); }
// void reader(string& a){cin >> a;};
template<class T, class U> void reader(T& t, U& u) { reader(t); reader(u); }
template<class T, class U, class V> void reader(T& t, U& u, V& v) { reader(t); reader(u); reader(v); }

void writer(const int a, char c) { printf("%d", a); putchar(c); }
void writer(const ll a, char c) { printf("%lld", a); putchar(c); }
void writer(const ull a, char c) { printf("%llu", a); putchar(c); }
void writer(const double a, char c) { printf("%.20lf", a); putchar(c); }
void writer(const char a[]) { printf("%s", a); };
void writer(const char a[], char c) { printf("%s", a); putchar(c); };
void writer(const char a, char c) { putchar(a); putchar(c); };
template<class T> void writerLn(T t) { writer(t, '\n'); }
template<class T, class U> void writerLn(T t, U u) { writer(t, ' '); writer(u, '\n'); }
template<class T, class U, class V> void writerLn(T t, U u, V v) { writer(t, ' '); writer(u, ' '); writer(v, '\n'); }
template<class T> void writerArr(T x[], int n) { int i; if (!n) { putchar('\n'); return; }rep(i, n - 1) writer(x[i], ' '); writer(x[n - 1], '\n'); }
template<class T> void writerVec(vector<T> x) { int n = x.size(); int i; if (!n) { putchar('\n'); return; }rep(i, n - 1) writer(x[i], ' '); writer(x[n - 1], '\n'); }

vector<string> split(const string &str, char sep) { vector<string> v; stringstream ss(str); string buffer; while (getline(ss, buffer, sep)) { v.push_back(buffer); }return v; }
// #define int ll
bool test = 1;
int dx[] = { 0,0,1,-1 };
int dy[] = { 1,-1,0,0 };
#define MAX 300000
//.....................
ull mod = (int)1e9 + 7;

ull N;

signed main(void)
{
	int a = 0;
	int b = 0;
	rep(i, 4) {
		int tmp;
		cin >> tmp;
		a += tmp;
	}
	rep(i, 4) {
		int tmp;
		cin >> tmp;
		b += tmp;
	}
	cout << max(a, b) << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main ( void )
{
  int sum[2] = { 0 };

  for ( int i = 0, x; i < 8; ++i )
  {
     cin >> x;
     sum[i/4] += x;
  }

  if ( sum[0] > sum[1] )
    cout << sum[0] << endl;
  else
    cout << sum[1] << endl;

  return 0;
}

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

int main() {
	int a, b, c, d, e, f, g, h, s, t;
	cin >> a >> b >> c >> d >> 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>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <ctime>
#include <vector>
#include <stack>

using namespace std;
////////////////*My library*////////////////////////
#define rep_to(a,i,n) for(int i=a;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rep_r(i,n) for(int i=n-1;i>=0;i--)
#define debug(x) cout<<x<<endl
#define s_1(x) cin>>x
#define s_2(x,y) cin>>x>>y
////////////////////////////////////////////////////

////////////////////////
/*prime()*/
/*primecount()*/
/*sort()*/
/*imos???*/
/*????????¢?´¢*/
/*??±???????????¢?´¢*/
/*???????¨???????*/
///////////////////////

int main()
{
	int N;
	int a,b,c,d;
	int sumA=0,sumB=0;
	
	rep(i,2)
	{
		cin>>a>>b>>c>>d;
		if(i==0)sumA=a+b+c+d;
		else sumB=a+b+c+d;
	}

	if(sumA>=sumB)cout<<sumA;
	else if(sumA<sumB)cout<<sumB;

	return 0;
}

C++: #include<iostream>
using namespace std;
int i, p, sumA=0, sumB=0;
int main () {
    for (i=1; i<=4; i++) {
        cin >> p;
        sumA += p;
    }
    for (i=1; i<=4; i++) {
         cin >> p;
         sumB += p;
    }
    cout << max(sumA,sumB) << endl;
    return 0;
}

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

int main() {
	int A[8];
	int n = 0;
	while (n < 8) {
		cin >> A[n];
		n++;
	}
	int M = A[0] + A[1] + A[2] + A[3];
	int N = A[4] + A[5] + A[6] + A[7];
	if (M > N) {
		cout << M << endl;
	}
	else {
		cout << N << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(){
	int a,b,c,d,e,f,g,h,s,t;
	scanf("%d %d %d %d",&a,&b,&c,&d);
	scanf("%d %d %d %d",&e,&f,&g,&h);
	 s = a+b+c+d;
	 t = e+f+g+h;
	 if(s>=t) printf("%d",s);
	 else if(s<t) printf("%d",t);
	 return 0;
}

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

int A[4], B[4];

int main(void) {
	for (int i = 0; i < 4; ++i) { scanf("%d", &A[i]); }
	for (int i = 0; i < 4; ++i) { scanf("%d", &B[i]); }

	printf("%d\n", std::max(A[0] + A[1] + A[2] + A[3], B[0] + B[1] + B[2] + B[3]));
	return 0;
}

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

int main(){
  int A=0,a,B=0,b;

  for(int i=0;i<4;i++)cin >> a, A+=a;
  for(int i=0;i<4;i++)cin >> b, B+=b;

  if(A>B)cout << A << endl;
  else cout << B << endl;
}

C++: #include<stdio.h>
int main(void)
{
	int x1,x2,x3,x4,y1,y2,y3,y4,s,t;
	scanf("%d %d %d %d %d %d %d %d",&x1,&x2,&x3,&x4,&y1,&y2,&y3,&y4);
	s=x1+x2+x3+x4;
	t=y1+y2+y3+y4;
	if(s>t){
		printf("d\n",s);
	}
	else if(s==t){
		pritnf("%d=%d\n",s,t);
	}
	else{
		printf("d\n",y);
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

int main(void){
	int s=0,t=0,x;
	for(int i=0;i<8;i++){
		cin >> x;
		if(i<4){
			s += x;
		}else{
			t += x;
		}
	}
	cout << max(s,t) << endl;
}

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

int main(){
int a;int b;
int i = 1;
int s;int d;int j;int k;
cin >> s >> d >> j >> k;
a = s+d+j+k;
int w;int ww;int www;int wwww;
cin >>w >> ww >> www >> wwww;
b = w + ww + www + wwww;
if(a >= b){
cout << a << endl;
}
else{
cout << b << endl;
}
    return 0;
}

C++: #include <iostream>
#include <queue>
#include <cctype>
#include <stdio.h>
#include <map>

using namespace std;


int main(int argc, char const* argv[])
{
    int a=0;
    int b=0;
    int tmp;
    for (int i = 0; i < 4; i++) 
    {
        cin >> tmp;
        a += tmp;
    }
    for (int i = 0; i < 4; i++) 
    {
        cin >> tmp;
        b += tmp;
    }
    cout << max( a, b) << endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
 
int main(){
int a,b,c,d,A,B,C,D,S,T;
cin>>a>>b>>c>>d;
cin>>A>>B>>C>>D;
S=a+b+c+d;
T=A+B+C+D;
if(S>T) cout<<"S\n";
else cout<<"T\n";
return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

	int s1[5] , s2[5];
	int ans1 = 0 , ans2 = 0;

	for(int i = 0; i < 4; i++){
		cin >> s1[i];

		ans1 += s1[i];
	}

	for(int i = 0; i < 4; i++){
		cin >> s2[i];

		ans2 += s2[i];
	}

	if(ans1 < ans2) cout << ans2 << endl;
	else  cout << ans1 << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
int a = 0, b = 0;
int in;
for(int i = 0; i < 8; i++){
cin >> in;
if(i < 4) a += in;
else b += in;
}
cout << max(a, b) << endl;
return 0;
}