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 <cstdio>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <cctype>
#include <complex>
#include <string>
#include <sstream>
#include <cassert>
using namespace std;

//common
using i32=int;using i64=long long;using ll =i64;
#define BR "\n"

#define ALL(c) (c).begin(),(c).end()
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define EACH(it,o) for(auto it = (o).begin(); it != (o).end(); ++it)
#define IN(l,v,r) ((l)<=(v) && (v)<(r))

typedef vector<int> vi; typedef pair<int,int> pii; typedef vector<pair<int,int> > vpii;
typedef long long ll; typedef vector<long long> vl; typedef pair<long long,long long> pll; typedef vector<pair<long long,long long> > vpll;
typedef vector<string> vs; typedef long double ld;

//x,y,z
template <typename T> using X = vector<T>;template <typename T> using Y = vector<T>;template <typename T> using Z = vector<T>;
template <typename T> using YX = Y<X<T>>;//H*W M*N
template <typename T> using ZYX = Z<YX<T>>;

#define H(Map) Map.size()
#define W(Map) Map[0].size()

//config
#define MODE_DEBUG
//#define INF 1<<30
//#define EPS 1e-8
//const ll MOD =100000007;

//debug
#ifdef MODE_DEBUG
#define  DUMP(x)  cerr << #x << " = " << (x) <<endl
#define DEBUG(x) DUMP(x) << " (L" << __LINE__ << ")" << " " << __FILE__<<endl
#define CHECK(exp,act)  if(exp!=act){DUMP(exp);DEBUG(act);}
#define STOP(e)  CHECK(e,true);if(!(e)) exit(1);
#else
#define DUMP(x)
#define DEBUG(x)
#define CHECK(exp,act)
#define STOP(e)
#endif

template<class T> inline string toString(const vector<T>& x) {
	stringstream ss;
	REP(i,x.size()){
		if(i!=0)ss<<" ";
		ss<< x[i];
	}
	return ss.str();
}
template<class T> inline string toString(const vector<vector<T>>& map) {
	stringstream ss;
	REP(i,map.size()){
		if(i!=0)ss<<BR;
		ss<< toString(map[i]);
	}
	return ss.str();
}
template<class K,class V>  string toString(map<K,V>& x) {
	string res;stringstream ss;
	for(auto& p:x)ss<< p.first<<":" << p.second<<" ";
	return ss.str();
}

template<typename T,typename V> inline T mod(T v,V MOD){
	return (v%MOD+MOD)%MOD;
}

int main(){
	int p1,p2,p3;cin >>p1 >> p2 >> p3;
	int j1,j2;cin >>j1>>j2;
	cout<<min(p1,min(p2,p3))+min(j1,j2)-50<<endl;
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int pasta[3];
  int soup[2];
  int i,j;
  int sum;
  int min=0;

  while(1){
    for(i=0; i<3; i++){
      cin >> pasta[i];
    }
    for(i=0; i<2; i++){
      cin >> soup[i];
    }

    for(i=0; i<3; i++){
      for(j=0; j<2; j++){
	sum=pasta[i]+soup[j];

	if(sum<min || min==0)
	  min=sum;
      }
    }
    break;
  }
  min=min-50;
  cout << min << endl;
}

C++: #include <cstdio>
using namespace std;
int main(void){
  int p;
  int i;
  int pmin=2001,jmin=2001;
  for(i=0;i<3;i++){
    scanf("%d",&p);
    if(p<pmin){
      pmin=p;
    }
  }
  for(i=0;i<2;i++){
    scanf("%d",&p);
    if(p<jmin){
      jmin=p;
    }
  }
  printf("%d\n",pmin+jmin-50);
  return(0);
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
	int a,b,c,d,e;
	scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
	printf("%d\n",min(a,min(b,c))+min(d,e)-50);
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a ; i++)
int main(void){
	int pa[3];
	int ju[2];
	rep(i,3)cin>>pa[i];
	rep(i,2)cin>>ju[i];
	sort(pa,pa+3);
	sort(ju,ju+2);
	cout<<pa[0] + ju[0] - 50 <<endl;
	
}

C++: #include<iostream>
using namespace std;
int main(){
	int i,j;
	int a[3]={0};
	int b[2]={0};
	int m=0;
	for(i=0;i<3;i++){
		cin>>a[i];
	}
	for(j=0;j<2;j++){
		cin>>b[j];
	}
	m=a[0]+b[0]-50;
	for(i=0;i<3;i++){
		for(j=0;j<2;j++){
			if(m>a[i]+b[j]-50){
				m=a[i]+b[j]-50;
			}
		}
	}
	cout<<m<<endl;
	return 0;
}

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

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

int main() {
    int p[3], j[2];
    cin >> p[0] >> p[1] >> p[2] >> j[0] >> j[1];
    sort(p, p+3);
    sort(j, j+2);
    cout << p[0] + j[0] - 50 << endl;
    return 0;
}

C++: #include<stdio.h>

int main(void){
	
	
	int a,b,c,d,e,minp,minj,i;
	
	scanf("%d",&a);
	
	minp = a;
	
	for(i=0;i<2;i++){
		
		scanf("%d",&b);
		
		if(b<a){
			
			minp = b;
		}
		
		else{
			;
		}
	}
	
	scanf("%d",&c);
	
	minj = c;
	
	for(i=0;i<1;i++){
		
		scanf("%d",&d);
		
		if(d<c){
			
			minj = d;
		}
		else{
			;
		}
	}
	
	e = minp + minj - 50;
	
	printf("%d",e);
	
	return 0;
}

C++: #include<iostream>
#include<string.h>
#include<vector>
#include<list>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << "debug " << x << endl;
using namespace std;

int main(){
    int p, j;
    while(cin >> p){
        int inp;
        rep(i, 2){
            cin >> inp;
            if(p > inp) p = inp;
        }
        cin >> j >> inp;
        j = min(j ,inp);
        cout << p + j - 50<< endl;
    }
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b,c,d,e;
    int minp,minj;
    cin >> a;
     cin >> b;
     cin >> c;
     cin >> d;
     cin >> e;
    if(a<=b && a<=c){minp=a;}
       if(b<=a && b<=c){minp=b;}
       if(c<=a && c<=b){minp=c;}
       if(d<=e){minj=d;}
       if(e<=d){minj=e;}
       
    cout<<minp+minj-50<<endl;

}