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;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<int ,P> P3;
typedef pair<P ,P> PP;
const ll MOD = ll(1e9+7);
const int IINF = INT_MAX;
const ll LLINF = LLONG_MAX;
const int MAX_N = int(1e5 + 5);
const double EPS = 1e-6;
const int di[] = {0, 1, 0, -1}, dj[] = {1, 0, -1, 0};
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define SORT(v) sort((v).begin(), (v).end())
#define ALL(v) (v).begin(), (v).end()

int main() {
    int ami=1000, bmi=1000, ans=0;
    REP(i,4){
        int a;
        cin >> a;
        ans += a;
        ami = min(ami,a);
    }
    REP(i,2){
        int b;
        cin >> b;
        ans += b;
        bmi = min(bmi, b);
    }
    cout << ans - ami - bmi << endl;
    return 0;
}

C++: #include<bits/stdc++.h>

using namespace std;

int main(){

  vector<int> rika(4);
  vector<int> syakai(2);
  int sum=0;
  
  for(int i=0;i<4;++i)
	cin>>rika[i];

  for(int i=0;i<2;++i)
	cin>>syakai[i];

  sort(rika.begin(),rika.end());
  sort(syakai.begin(),syakai.end());

  for(int i=3;i>=1;--i)
	sum+=rika[i];

  sum+=syakai[1];

  cout<<sum<<endl;
  
}

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

int main() {
    int arr[4], t, sum = 0;
    for (int i = 0; i < 4; i++) scanf("%d", &arr[i]);
    sort(arr, arr+4);
    for (int i = 0; i < 2; i++) { scanf("%d", &t); sum = max(sum, t); }
    for (int i = 1; i < 4; i++) sum+= arr[i];
    printf("%d\n", sum);
    return 0;
}

C++: #include <bits/stdc++.h>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999

using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int iy[]={0, 0, 1, -1};
int ix[]={1, -1, 0, 0};



int main(){
	int a,b,c,d,e,f;
	cin >> a >> b >> c >> d >> e >> f;
	cout << a+b+c+d+e+f-min(min(a,b),min(c,d))-min(e,f) << endl;
	return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int x=0,i,a[6];
	for(i=0;i<6;i++) scanf("%d",&a[i]);
	sort(a,a+4,greater<int>());
	for(i=0;i<3;i++) x=x+a[i];
	if(a[4]<a[5]) x=x+a[5];
	else x=x+a[4];
	printf("%d\n",x);
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<cstdlib>
using namespace std;

int main() {
  int a,b,c,d,e,f;
  cin >> a >> b >> c >> d >> e >> f;
  int ans = max(a, b) + max(c, d) + max(min(a, b), min(c, d)) + max(e, f);
  cout << ans << endl;
}

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

int main()
{
    int a[4], b[2];

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

    cin >> b[0] >> b[1];

    sort(a, a + 4);

    cout << a[1] + a[2] + a[3] + max(b[0], b[1]) << endl;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int a[4], b[2];
    for (int i = 0; i < 4; i++) {
        cin >> a[i];
    }
    for (int i = 0; i < 2; i++) {
        cin >> b[i];
    }

    sort(a, a + 4, greater<int>());
    sort(b, b + 2, greater<int>());

    cout << a[0] + a[1] + a[2] + b[0] << endl;
    return 0;
}

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

using namespace std;

int main(){
	vector<int> score(6);
	for(int i = 0; i < 6; i++){
		cin >> score[i];
	}
	int science = score[0] + score[1] + score[2] + score[3];
	science -= min(min(score[0], score[1]),min(score[2], score[3]));
	
	cout << science + max(score[4], score[5]);
	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]+a[2]+b[0]<<endl;
}

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

int sum_test_pnt(int n)
{
	int test;
	int sum = 0;
	int min_pnt = 100;
	
	while(n--) {
		cin >> test;
		
		sum += test;
		if(min_pnt > test) {
			min_pnt = test;
		}
	}
	
	return sum - min_pnt;
}

int main()
{
	int ans = sum_test_pnt(4);
	ans += sum_test_pnt(2);
	
	cout << ans << endl ;
	
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,e,f,m1,x1,x2,x3,max,min,ans;
	scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
	if(a<=b){
		x1=a;
	}
	else if(b<=a){
		x1=b;
	}
	if(x1<=c){
		x2=x1;
	}
	else if(c<=x1){
		x2=c;
	}
	if(x2<=d){
		x3=x2;
	}
	else if(d<=x2){
		x3=d;
	}
	if(e<=f){
		m1=e;
	}
	else if(f<=e){
		m1=f;
	}	
	max=a+b+c+d+e+f;
	min=m1+x3;
	ans=max-min;
	printf("%d\n",ans);
	return 0;
}

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

int main() {
    vector<int> x(6);
    int ans = 0;
    for(int i = 0; i < 6; ++i) {
        cin >> x[i];
        ans += x[i];
    }
    ans -= min({x[0], x[1], x[2], x[3]}) + min(x[4], x[5]);
    cout << ans << endl;
}

C++: #include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <time.h>
#include <stdlib.h>
using namespace std;

int main(){
	int sum=0,min,scr;
	cin >> scr;
	sum += scr;
	min = scr;
	cin >> scr;
	sum += scr;
	if(min>scr) min = scr;
	cin >> scr;
	sum += scr;
	if(min>scr) min = scr;
	cin >> scr;
	sum += scr;
	if(min>scr) min = scr;
	sum -= min;
	cin >> scr;
	sum += scr;
	min = scr;
	cin >> scr;
	sum += scr;
	if(min>scr) min = scr;
	sum -= min;
	printf("%d\n",sum);
	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main(void){
    int a,b,g=100,h=0,j = 0;
    for(int i = 0; i < 4; i++){
    cin >>a;
    g = min(g,a);
    j = j + a;
    }
    j = j - g;    
    for(int i = 0; i < 2; i++){
    cin >>b;
    h = max(h,b);
    }
    cout<<j + h<<endl;
}