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 <stdio.h>

int main(){
   int i1[3] = {2001,2001,2001};
   for(int n = 0; n < 3; n++){
     scanf("%d",&i1[2]);
     if(i1[0] > i1[2]) i1[0] = i1[2];
   }
   printf("paste = %d\n",i1[0]);
   for(int n = 0; n < 2; n++){
     scanf("%d",&i1[2]);
     if(i1[1] > i1[2]) i1[1] = i1[2];
   }
   printf("juise = %d\n",i1[1]);
   printf("%d\n",(i1[0] + i1[1]) - 50);
}

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

int main(void)
{
	int p=1<<30,j=1<<30;
	int a,b;

	for(int i = 0; i < 3; i++){
		cin >> a;
		p = min(p,a);
	}
	for(int i = 0; i < 2; i++){
		cin >> a;
		j = min(j,a);
	}

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

	return 0;
}

C++: #include <iostream>
using namespace std;
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <functional> //sort(A,A.end(),greater<int>());???????????????
#include <queue>
#include <stack>
#include <vector>

#define INF 10 << 10

int main() {

	int a[5];

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

	int sum = min(a[0], min(a[1], a[2])) + min(a[3], a[4]);

	cout << sum - 50 << endl;

	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>
#include <vector>
#include <list>
#include <map>
#include <string>
#include <functional>
#include <math.h>
#include <utility>
using namespace std;
int main()
{
	int p[3],j[2],ans;
	cin>>p[0]>>p[1]>>p[2]>>j[0]>>j[1];
	ans=min(p[0],min(p[1],p[2]))+min(j[0],j[1])-50;
	cout<<ans<<endl;
	return 0;
}

C++: #include<iostream>

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

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

int min(int x,int y){if(x<=y)return x; return y;}

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<ctime>
#include<math.h>
using namespace std;

int main(){
    int a, b, c, d, e;
    cin >> a >> b >> c >> d >> e;
    int pasta, juice;
    if(a >= b){
        if(b>=c){
        pasta = c;}
        else{
        pasta = b;
        }}
    else{
        if(a>=c){
            pasta = c;
        }
        else{
            pasta = a;
        }
    }
    
    if(d >=e){
        juice = e;
    }
    else{
        juice = d;
    }
    
    cout << pasta + juice-50<< endl;
    return 0;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

int main()
{
  int pasta[3]; FOR(i,0,3) cin >> pasta[i];
  int ju[2]; FOR(i,0,2) cin >> ju[i];
  int ans = 999999;
  FOR(i,0,3) {
    FOR(j,0,2) {
      ans = min(ans, pasta[i]+ju[j]-50);
    }
  }
  cout << ans << endl;
  return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
using namespace std;
int main(void){

	int a,b,c,x,y;
	cin>>a>>b>>c>>x>>y;
	int m,n;
	m=min(a,b);
	m=min(m,c);
    n=min(x,y);
    cout<<m+n-50<<endl;

	return 0;
}

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

int main() {
    int a[5];
    REP(i,5) cin >> a[i];
    cout << min({a[0],a[1],a[2]})+min(a[3],a[4])-50 << endl;
    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>

using namespace std;

int main()
{
	int a,b,c,d,e,f,g,h;
	cin>>a;
	cin>>b;
	cin>>c;
	cin>>d;
	cin>>e;
	if(e<d)
	{
		f=e-50;
		if(a<b)
		{
			if(a<c){cout<<a+f<<endl;}
			else{cout<<c+f<<endl;}
		}
		else
		{
			if(b<c){cout<<b+f<<endl;}
			else{cout<<c+f<<endl;}
		}
	}
	else
	{
		f=d-50;
		if(a<b)
		{
			if(a<c){cout<<a+f<<endl;}
			else{cout<<c+f<<endl;}
		}
		else
		{
			if(b<c){cout<<b+f<<endl;}
			else{cout<<c+f<<endl;}
		}
		
	}
    getchar 0;

}

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

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

int main(){

  int pasta=2000,juice=2000,in;

  for(int i=0; i<3; i++){
    cin>>in;
    if(in<pasta)pasta = in;
  }
  for(int i=0; i<2; i++){
    cin >> in;
    if(in<juice)juice = in;
  }

  cout << pasta + juice - 50 << endl;

  return 0;
}

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

using namespace std;

int main(){
  int p,j,mp,mj,i;

  for(i=0;i<3;i++){
    cin>>p;
    if(i==0)mp=p;
    else{
      if(mp>p)mp=p;
    }
  }

  for(i=0;i<2;i++){
    cin>>j;
 if(i==0)mj=j;
    else{
      if(mj>j)mj=j;
    }
  }

  cout<<mp+mj-50<<endl;

  return 0;
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(void)
{
	int a[2000],b[2000],i;
	int q;
	for(i=0;i<3;i++){
		scanf("%d",&a[i]);
	}
	sort(a,a+3);
		
	for(i=0;i<2;i++){
		scanf("%d",&b[i]);
	}
	sort(b,b+2);

	q=a[0]+b[0]-50;
	printf("%d\n",q);
	return 0;
}

C++: //Lunch
#include <iostream>

using namespace std;

int main() {
    int p, j, minp = 10000, minj = 10000;
    for(int i = 0; i < 3; i++) {
        cin >> p;
        minp = min(minp, p);
    }
    for(int i = 0; i < 2; i++) {
        cin >> j;
        minj = min(minj, j);
    }

    cout << (minp + minj - 50) << endl;

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
using tlll=tuple<ll,ll,ll>;
using vs=vector<string>;

#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n) range(i,0,n)
#define rrep(i,n) for(int i=(n)-1;i>=0;i--)
#define range(i,a,n) for(int i=(a);i<(n);i++)

#define LINF ((ll)1ll<<60)
#define INF ((int)1<<30)
#define EPS (1e-9)
#define MOD (1000000007ll)
#define fcout(a) cout<<setprecision(a)<<fixed
#define fs first
#define sc second
#define PI 3.1415926535897932384

int dx[]={1,0,-1,0,1,-1,-1,1},dy[]={0,1,0,-1,1,1,-1,-1};

template<class T>bool chmax(T&a,T b){if(a<b){a=b; return true;}return false;}
template<class T>bool chmin(T&a,T b){if(a>b){a=b; return true;}return false;}
template<class S>S acm(vector<S>&a){return accumulate(all(a),S());}
template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}
void YN(bool b){cout<<(b?"YES":"NO")<<"\n";}
void Yn(bool b){cout<<(b?"Yes":"No")<<"\n";}
void yn(bool b){cout<<(b?"yes":"no")<<"\n";}

ll max(int a,ll b){return max((ll)a,b);} ll max(ll a,int b){return max(a,(ll)b);}
template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class S>auto&operator<<(ostream&os,vector<S>t){bool a=1; for(auto s:t){os<<(a?"":" ")<<s;a=0;} return os;}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	cout<<min({a,b,c})+min(d,e)-50<<endl;
}