Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	n, _ := strconv.Atoi(sc.Text())
	return n
}

func main() {
	sc.Split(bufio.ScanWords)

	a, b, c, d, e := nextInt(), nextInt(), nextInt(), nextInt(), nextInt()
	x := a
	if b < x {
		x = b
	}
	if c < x {
		x = c
	}
	y := d
	if e < y {
		y = e
	}

	fmt.Println(x + y - 50)
}

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

using namespace std;

int main()
{
    int pasta[3], juice[2];

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

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

    sort(pasta, pasta + 3);
    sort(juice, juice + 2);

    cout << pasta[0] + juice[0] - 50 << endl;
}

C++: #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <ostream>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define INF 1000000000
#define rep(i,a,b) for (int i=(a);i<(b);i++)
#define rev(i,a,b) for (int i=(a)-1;i>=b;i--)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef queue<int> qi;
typedef vector<int> vi;
typedef vector<string> vs;
int dx[4] = { 0, 1, 0, -1 };
int dy[4] = { 1, 0, -1, 0 };

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

  int p = -1, g = -1;
  rep(i,0,3) {
    int a;
    cin >> a;
    p = max(p, a);
  }
  rep(i,0,2) {
    int a;
    cin >> a;
    g = max(g, a);
  }

  cout << p+g-50 << endl;


	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
	int a[5000], b, c, g = 0, h = 0, i, g1[5000]={0}, g2[5000]={0};
	for(i=0;i<3;i++){	
		cin >> a[i];
	}
	cin >> b >> c;
	for(i=0;i<3;i++){	
		g1[i] = a[i] + b - 50;
		g2[i] = a[i] + c - 50;
	}
	if(g1[0] < g1[1]){
		 g = g1[0];
	}	
	else{
		 g = g1[1];
	}
	if(g > g1[2]){
		 g = g1[2];
	}	
	if(g2[0] < g2[1]) h = g2[0];	
	}
	else{
		 h = g2[1];
	}
	if(h > g2[2]){
		 h = g2[2];
	}
	if(g < h){
		 cout << g;
	}
	else{
		 cout << h << endl;
 	}
	return 0;
}

C++: #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <climits>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define ALL(A)		(A).begin(),(A).end()
#define DUMP(A)    cout<<#A<<"="<<(A)<< endl
#define SIZE(A)    (int)((A).size())
#define MP  make_pair
using namespace std;
typedef long long ll;

int vx[]={1,0,-1,0},vy[]={0,1,0,-1};

int main(){
    int p1,p2,p3,j1,j2;
    scanf("%d%d%d%d%d",&p1,&p2,&p3,&j1,&j2);
    printf("%d\n",min(min(p1,p2),p3)+min(j1,j2)-50);
}

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

int main() {
        int i;
//      vector<vector<int>> D(N, vector<int>(3));
        vector<int> P;
        vector<int> D;



        rep (p, 3) {
                cin >> i;
                P.push_back(i);
        }
        rep (d, 2) {
                cin >> i;
                D.push_back(i);
        }
        int p = *min_element(P.begin(), P.end());
        int d = *min_element(D.begin(), D.end());


        cout << p + d - 50 << endl;
        return 0;
}

C++: #include<bits/stdc++.h>
using namespace std ;
int main()
{
    int menu[5] = {0} ;
    for ( int i = 0 ; i < 5 ; i++ )
    {
        cin >> menu[i] ;
    }
    cout << min( min( menu[0],menu[1] ),menu[2] ) + min( menu[3],menu[4] ) - 50 << endl ;

    return 0 ;
}

C++: #include<iostream>
#include<algorithm>
#define INF 1 << 30
using namespace std;

int main()
{
	int pmin = INF, jmin = INF;
	for (int i = 0; i < 3; i++){
		int in;
		cin >> in;
		pmin = min(pmin, in);
	}
	for (int i = 0; i < 2; i++){
		int in;
		cin >> in;
		jmin = min(jmin, in);
	}
	cout << pmin + jmin - 50 << endl;
	return 0;
}

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

C++: #include<iostream>

using namespace std;
int main(){
	/*for(int i=0;i<5;i++){
		int B[10];
		for(int i=0;i<10;i++){
			cin >> B[i];
			if(B[i] == 0){
				return 0; //プログラムの強制終了
			}
		}

		int sum = 0;

		for(int i=1;i<10;i++){
			sum += B[i];
		}

		cout << B[0] - sum << endl;
	}*/
	/*int s,h,o,p;
	cin >> s >> h >> o >> p;

	cout << (s+h+o+p)/60 << endl << (s+h+o+p)%60 << endl;*/
	int P, A, S, j, u;
	cin >> P >> A >> S >> j >> u;

	int minP=min(P,A);//最も代金が安いパスタ
	int minA=min(minP,S);
	int minj=min(j,u);//最も代金が安いジュース

	cout << (minA + minj)-50 << endl;
	//最も代金が安いパスタとジュースの代金の合計

	return 0;

}

C++: #include<stdio.h>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int money1[3]={0},money2[2]={0},sum=0;
	for(int i=0;i<3;i++){
		scanf("%d",&money1[i]);
	}
	for(int i=0;i<2;i++){
		scanf("%d",&money2[i]);
	}
	sort(money1,money1+3);
	sort(money2,money2+2);
	sum=money1[0]+money2[0]-50;
	printf("%d\n",sum);
	return 0;
}

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

int main() {
    vector<int> P(3), D(2);
    for (auto& i : P) cin >> i;
    for (auto& i : D) cin >> i;

    int ans = 1 << 28;
    for (auto i : P) {
        for (auto j : D) {
            ans = min(ans, i + j - 50);
        }
    }

    cout << ans << endl;
}

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

using namespace std;

int main(){

  int pasta1,pasta2,pasta3,juice1,juice2;
  int ans_p;
  int ans_j;
  
  cin>>pasta1;
  cin>>pasta2;
  cin>>pasta3;
  cin>>juice1;
  cin>>juice2;

  if(pasta1<pasta2 && pasta1<pasta3)
	ans_p = pasta1;
  else if(pasta2<pasta1 && pasta2<pasta3)
	ans_p = pasta2;
  else
	ans_p = pasta3;

  if(juice1 < juice2)
	ans_j = juice1;
  else
	ans_j = juice2;

  cout<<ans_p + ans_j - 50 <<endl;

  return 0;
  
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),n.end()
#define PI acos(-1)
using namespace std;
int main(){

  int sum=-50;
  int min=99999;
  rep(i,3){
    int tmp;
    cin>>tmp;
    if(min>tmp)min=tmp;
  }
  sum+=min;
  min=99999;
  rep(i,2){
    int tmp;
    cin>>tmp;
    if(min>tmp)min=tmp;
  }
  sum+=min;
  cout<<sum<<endl;

}

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


int main(){
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;

  if( a < b && a < c && d < e) cout<<a+d-50<<endl;
  if( a < b && a < c && e < d) cout<<a+e-50<<endl;
  if( b < a && b < c && d < e) cout<<b+d-50<<endl;
  if( b < a && b < c && e < d) cout<<b+e-50<<endl;
  if( c < b && c < a && d < e) cout<<c+d-50<<endl;
  if( c < b && c < a && e < d) cout<<c+e-50<<endl;

 return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int pa,ju,most=10000,ans;
  for(int i=0;i<3;i++){
    cin >> pa;
    if(pa<most){
      most=pa;
    }
  }
  ans=most;
  most=10000;
  for(int i=0;i<2;i++){
    cin >> ju;
    if(ju<most){
      most=ju;
    }
  }
  ans+=most;
  ans-=50;
  cout << ans << endl;
  return (0);
}

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

int main(){

	int answer;
	int p1,p2,p3,j1,j2;
	int P,J;

	cin >> p1 >> p2 >> p3 >> j1 >> j2;
	
	P = min( min(p1, p2), p3);
	J = min(j1, j2);

	cout << P + J - 50 << endl;


	/*
	int datanum = 0;
	for(int dataset = 0; dataset < 1; dataset++){
		if(input == 0) break;


		answer[dataset] = sum;

		datanum++;
	}

	for(int dataset = 0; dataset < datanum; dataset++){
		cout << answer[dataset] << endl;
	}
	*/

	

	return 0;
}