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<bits/stdc++.h>

using namespace std;

int main(){

int a,b,c,d,e,pasta,juice;

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

pasta =a;

if(a>=b)pasta=b;

if(pasta>=c)pasta=c;


juice=d;

if(d>=e)juice=e;

int sum=pasta+juice-50;

cout<<sum<<endl;

return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int x,y,z,w,q;
cin>>x>>y>>z>>w>>q;
if(y>x&&z>x){
if(w>q){cout<<x+q-50<<endl;} 
else if(w<q){cout<<x+w-50<<endl;}
}

else if(x>y&&z>y){
if(w>q){cout<<y+q-50<<endl;} 
else if(w<q){cout<<y+w-50<<endl;}
}

else if(x>z&&y>z){
if(w>q){cout<<z+q-50<<endl;} 
else if(w<q){cout<<z+w-50<<endl;}
}

return 0;
}

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

using namespace std;

int main(){

  int p_min = 3000;
  int j_min = 3000;
  for(int i = 0;i < 5;++i){
    if(i < 3){
      int p;
      cin>>p;

      p_min = min(p,p_min);
    }
    else{
      int j;
      cin>>j;

      j_min = min(j,j_min);
    }
  }

  int ans = p_min + j_min - 50;
  cout<<ans<<endl;

  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	ios_base::sync_with_stdio(false);
	int N = 999999;
	int M = 999999;
	for(int i = 0 ; i < 3 ; i++){
		int in; cin >> in;
		N = min(in,N);
	}
	for(int i = 0 ; i < 2 ; i++){
		int in; cin >> in;
		M = min(in,M);
	}
	cout << N + M - 50 << endl;
}

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

int main(){


  int pasta1;
  int pasta2;
  int pasta3;
  int juice1;
  int juice2;
  cin >> pasta1 >> pasta2 >> pasta3 >> juice1 >> juice2;
  cout << min( pasta1 , min( pasta2 ,pasta3)) + min( juice1 ,juice2) -50 <<endl;

  return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<string>

using namespace std;

int main(){
    int a,b,pasta[3],juse[2];
    for(int i = 0;i < 3;i++){
        cin >> pasta[i];
    }
    for(int i = 0;i < 2;i++){
        cin >> juse[i];
    }
    a = min(min(pasta[0],pasta[1]),pasta[2]);
    b = min(juse[0],juse[1]);
    cout << a + b -50 << endl;
    return 0;
}

C++: #include <stdio.h>

main()
{
	int a,b,c,d,e;
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&c);
	scanf("%d",&d);
	scanf("%d",&e);
	int m,n;
	if (a<b)
		if (a>c) m = c;
		else     m = a;
	else
		if (b>c) m = c;
		else	 m = b;
	if (d<e) n = d;
	else	 n = e;
	int S;
	S = m + n - 50;
	printf("%d",S);
}

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

int main(){
   int p1,p2,p3,j1,j2,set;
   cin>>p1>>p2>>p3>>j1>>j2;
   if(p1<p2&&p1<p3){
     if(j1<j2){
       set = p1+j1-50;
       cout<<set<<endl;
     }else{
       set = p1+j2-50;
       cout<<set<<endl;
     }
   }else if(p2<p1&&p2<p3){
     if(j1<j2){
       set = p2+j1-50;
       cout<<set<<endl;
     }else{
       set = p2+j2-50;
       cout<<set<<endl;
     }
   }else if(p3<p1&&p3<p2){
     if(j1<j2){
       set = p3+j1-50;
       cout<<set<<endl;
     }else{
       set = p3+j2-50;
       cout<<set<<endl;
     }

   }
   return 0;
}

C++: #include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>
#include <cstring>

typedef long long ll;

using namespace std;

ll nCr[2000][2000] = {0};

int main(void){
	int p[3];
	int juice[2];
	int m = 10000;

	cin >> p[0] >> p[1] >> p[2];
	cin >> juice[0] >> juice[1];

	for(int i=0; i<3; ++i){
		for(int j=0; j<2; ++j){
			m = min(m, p[i] + juice[j] - 50);
		}
	}

	cout << m << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long
using namespace std;
 
int main() {
  ll a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;
  ll pasta=min(a,min(b,c));
  ll drink=min(d,e);
  cout<<pasta+drink-50<<endl;
}

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

int main(){
  int p[3], ju[2];
  int pmin = 10000, jumin=10000;

  for( int i=0;i<3;i++ ){
    cin >> p[i];
    if( p[i]<pmin ) pmin=p[i];
  }
  for( int i=0;i<2;i++ ){
    cin >> ju[i];
    if( ju[i]<jumin ) jumin=ju[i];
  }
  cout << pmin+jumin-50 << endl;


  return 0;
}

C++: #include <stdio.h>

main()
{
	int a,b,c,d,e;
	scanf("%d",&a);
	scanf("%d",&b);
	scanf("%d",&c);
	scanf("%d",&d);
	scanf("%d",&e);
	int m,n;
	if (a<b)
		if (a>c) m = c;
		else     m = a;
	else
		if (b>c) m = c;
		else	 m = b;
	if (d<e) n = d;
	else	 n = e;
	int S;
	S = m + n - 50;
	printf("%d","S\n");
}

C++: #include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define TO_STRING(a) #a
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }
template<class T> void MSG(T a){ cout << TO_STRING(a) << " = " << a << endl; }
 
 
const int INF = 1 << 30;
 
int main()
{
        // Source
        int piza = INF, juice = INF;
        rep(i, 5)
        {
                int in;
                cin >> in;
                chmin((i < 3 ? piza : juice), in);
        }
        cout << piza + juice - 50 << endl;
}

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

int a[3];
int b[2];
int a_min;
int b_min;
int ans;

int main(){
	for(int i = 0; i < 3; i++){
		cin >> a[i];
	}
	for(int i = 0; i < 2; i++){
		cin >> b[i];
	}
	
	a_min = a[0];
	b_min = b[0];
	for(int i = 0; i < 3; i++){
		if(a_min > a[i]){
			a_min = a[i];
		}
	}
	for(int i = 0; i < 2; i++){
		if(b_min > b[i]){
			b_min = b[i];
		}
	}
	
	ans = a_min + b_min - 50;
	cout << ans << endl;
}

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

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

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

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

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

  return 0;
}

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF (1<<29)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define CLR(a) memset(a,0,sizeof(a))
const int dx[] = {-1,0,0,1},dy[] = {0,1,-1,0};

typedef long long int ll;

using namespace std;

int main(){
    int d[5];
    REP(i,5){
	cin >> d[i];
    }
    int ans = 10000000;
    REP(i,2)REP(j,3){
	ans = min(ans, d[3+i]+d[j]-50);
    }
    cout << ans << endl;
    return 0;
}