Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"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 main() {
	scanner.Split(bufio.ScanWords)
	points := make([]int, 6)
	for i := 0; i < 6; i++ {
		points[i] = nextInt()
	}
	// fmt.Println(points)
	sort.Slice(points[:4], func(i, j int) bool { return points[i] > points[j] })
	// fmt.Println(points)
	points2 := points[4:]
	sort.Slice(points2, func(i, j int) bool { return points2[i] > points2[j] })
	// fmt.Println(points)

	fmt.Println(points[0] + points[1] + points[2] + points2[0])
}

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

int main() {
    vector<int> a(4);
    vector<int> b(2);
    for (int i = 0; i<4; i++) {
        cin >> a[i];
    }
    for (int i = 0; i<2; i++) {
        cin >> b[i];
    }
    sort(a.begin(), a.end());
    sort(b.begin(), b.end());
    cout << a[3] + a[1] + a[2] +b[1] << endl;
    
    return 0;
}

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

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

int main(){
  int P[6];
  for(int i=0;i<6;i++){
    cin >> P[i];
  }
  sort(P,P+6);
  int sum = 0;
  for(int i=0;i<4;i++){
    sum += P[i];
  }
  cout << sum << endl;
}

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

using namespace std;

int main(){
    int a[4], b[2];
    for(auto&& i : a){
        cin >> i;
    }
    for(auto&& j : b){
        cin >> j;
    }
    sort(rbegin(a), rend(a));
    sort(rbegin(b), rend(b));
    cout << accumulate(begin(a), begin(a) + 3, 0) + b[0] << "\n"; 
}

C++: #include <iostream>
using namespace std;
int main(void)
{
    int A,B,C,D,E,F;
    cin>>A>>B>>C>>D>>E>>F;
    int G=A+B+C+D;
    int H=0;
    int I=2000;
    if(A<I)
    {
        I=A;
    }
    if(B<I)
    {
        I=B;
    }
    if(C<I)
    {
        I=C;
    }
    if(D<I)
    {
        I=D;
    }
    H+=G-I;
    if(E<F)
    {
        H+=F;
    }
    else
    {
        H+=E;
    }
    cout<<H<<endl;
    return 0;
}

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

int main()
{
	int a[6];
	for (int i = 0; i < 6; i++) cin >> a[i];
	cout << accumulate(a, a + 6, 0) - *min_element(a, a + 4) - *min_element(a + 4, a + 6) << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
const long long INFLL = 1LL << 60;
const int INFINT = 1 << 30;
const long long MOD = 1e9 + 7;

template <class T> void vecout(T V) {
    auto t = V.begin();
    while(t != V.end()) {
        cout << *t++;
        if(t != V.end()) cout << " ";
    }
    cout << endl;
};

int main() {
    int A, B, C, D, E, F, T = 0;
    cin >> A >> B >> C >> D >> E >> F;
    cout << A + B + C + D - min({A, B, C, D}) + max(E, F) << endl;
}

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

#include<algorithm>

int main(){

	int a, b, c, d, e, f;
	int sum;

	cin >> a >> b >> c >> d >> e >> f;

	sum = a + b + c + d;
	sum -= min(a, min(b, min(c, d)));
	sum += max(e, f);

	cout << sum << endl;
}

C++: /* {{{ Shinobu kawaii */
/*
  ______   __        _                  __                 
.' ____ \ [  |      (_)                [  |                
| (___ \_| | |--.   __   _ .--.   .--.  | |.--.   __   _   
 _.____`.  | .-. | [  | [ `.-. |/ .'`\ \| '/'`\ \[  | | |  
| \____) | | | | |  | |  | | | || \__. ||  \__/ | | \_/ |, 
 \______.'[___]|__][___][___||__]'.__.'[__;.__.'  '.__.'_/ 
                                                           
*/
/* }}} */

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

// #define int long long

/* cpp template {{{ */

/* short */
#define pb push_back
#define mp make_pair
#define print(x) cout << x << '\n'
#define Fi first
#define Se second

/* REPmacro */
#define REPS(i, a, n) for (int i = (a); i < (n); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = 1; i <= (n); i++)
#define DEPS(i, a, n) for (int i = (a); i >= n; i--)
#define DEP(i, n) for (int i = (n); i >= 0; i--)

/* typedef */
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef pair<int, int> pii;

/* const */
const int INF = 999999999;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1}, dy[] = {1, 0, -1, 0, 1, -1, -1, 1};

/* func */
inline bool is_uruu(int y) {return (y % 4 == 0 && (y % 100 != 0 || y % 400 == 0));}
inline bool inside(int y, int x, int H, int W) {return (y >= 0 && x >= 0 && y < H && x < W);}

/* }}} */

signed main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a[4], e, f;
  
  REP(i, 4) cin >> a[i];
  cin >> e >> f;
  sort(a, a + 4);
  print(a[3] + a[2] + a[1] + max(e, f));

  return (0);
}

C++: #include<stdio.h>
#include<string.h>
int main(){
	int r=0,a[4],b[2],i,s=100,nf;
	scanf("%d%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&b[0],&b[1]);
	for(i=0;i<4;i++){
		if(s>=a[i]){
			s=a[i];
			nf=i;
		}
	}
	for(i=0;i<4;i++){
		if(i!=nf){
			r+=a[i];
		}
	}
	if(b[0]>b[1]){
		r+=b[0];
	}else{
		r+=b[1];
	}

	printf("%d\n",r);
	return 0;
}

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

int main(){
    int a[4],b[2];
    cin >>a[0]>>a[1]>>a[2]>>a[3]>>b[0]>>b[1];
    sort(a, a+4);
    sort(b, b+2);
    cout << a[1]+a[2]+a[3]+b[1] << endl;
    return 0;
}

C++: #include<iostream>
#include <algorithm>
#include<math.h>
#include<stdio.h>
#include<vector>
#include<queue>
#include<stack>
#include<string>
#include<functional>

using namespace std;
#define FOR(i,a) for(int i=0;i<a;i++)


int main(){
	int a[4];int b[2];
	FOR(i,4){cin>>a[i];}
	FOR(i,2){cin>>b[i];}
	sort(a,a+4,greater<int>());
	sort(b,b+2,greater<int>());
	cout<<a[0]+a[1]+b[0}<<endl;
}

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

using namespace std;

#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)

int main() {
	int score[4], ans = 0;
	
	REP(i, 4) cin >> score[i];
	sort(score, score + 4, greater<int>());
	REP(i, 3) ans += score[i];
	
	REP(i, 2) cin >> score[i];
	ans += max(score[0], score[1]);
	
	cout << ans << endl;
}

C++: #include <bits/stdc++.h>
#define range(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, a) range(i, 0, a)
using namespace std;

int main() {
    int a[4], b[2];
    rep (i, 4) cin >> a[i];
    rep (i, 2) cin >> b[i];
    sort(a, a + 4);
    cout << a[1] + a[2] + a[3] + max(b[0], b[1]) << endl;

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a,b,c,d,e,f;cin>>a>>b>>c>>d>>e>>f;cout<<a+b+c+d-min(min(a,b),min(c,d))+max(e,f)<<endl;
}

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

int main(){
	int s[4];
	int m_max;
	int h[3];
	int h_max;
	for(int i = 0;i<4;i++){
		cin>>s[i];
		m_max += s[i];
	}
	m_max -= (min(s[0],min(s[1],min(s[2],s[3]))));
	for(int i = 0;i<2;i++){
		cin>>h[i];
		h_max+=h[i];
	}
	h_max -= (min(h[0],h[1]));
	m_max += h_max;
	cout<<m_max<<endl;
}

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