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>
#include <array>
#include <functional>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string>
#include <vector>

#define INF 1000000000
#define MOD 1000000007
#define ll long long
#define rep(i,a,b) for(int i = (a); i < (b); i++)
#define bitget(a,b) (((a) >> (b)) & 1)
#define vint vector<int>
#define vvint vector<vector<int>>
#define vsort(x) sort(x.begin(),x.end())

using int64 = uint64_t;

using namespace std;

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

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

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

using namespace std;

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

C++: #include<iostream>
#include <algorithm>
using namespace std;
int main()
{
    int n[3], h[2], i, l, g = 0;
    for (i = 0; i < 3; i++)
    {
        cin >> n[i];
    }
    for (i = 0; i<2; i++)
    {
        cin >> h[i];
    }
    for (i = 0; i <= 3; i++)
    {
        sort(n, n + 3);
    }
    l = n[0];
    if (h[0] < h[1])
        cout << l + h[0]-50 << endl;
    else
        cout << l + h[1]-50 << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	
	int a;
	int b;
	int c;
	cin >> a;
	cin >> b;
	cin >> c;

	int k = a;
	if (a > b) {
		k = b;
		if (b > c) {
			k = c;
		}
	}
	if (a > c) {
		k = c;
	}
    
	int p;
	int q;

	cin >> p;
	cin >> q;
	 
	int n = p;
	if (p > q) {
		n = q;
	}
	int sum = k + n -50;
	cout << sum << endl;



	getchar();
	getchar();
	return 0;
}

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

C++: //
//  main.cpp

#include <iostream>
using namespace std;


int main(){	
	int pastamin = 0;
	int juicemin = 0;
	int input;
	for(int i=0;i<3;i++){
		cin >> input;
		pastamin = min(input,pastamin);
	}
	for(int i=0;i<2;i++){
		cin >> input;
		juicemin = min(input,juicemin);
	}
	
	cout << pastamin + juicemin - 50 << endl;
	return 0;
}

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

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

int main() {
	int a, b, c, d, e, q, w;
	cin >> a >> b >> c >> d >> e;
	q = min({ a,b,c });
	w = min({ d,e });
	cout << q + w - 50 << endl;
}

C++: #include<stdio.h>
int main()
{
	int a, a_min =2001, b, b_min = 2001;
	for (int i = 1; i <= 3; i++) {
		scanf("%d", &a);
		if (a < a_min) {
			a_min = a;
		}
	}
	for(int i=1;i<=2;i++){
		scanf("%d", &b);
		if (b < b_min) {
			b_min = b;
		}

	}
	printf("%d\n", a_min + b_min-50);
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)
#define vvl(v,w,h,init) vector<vector<ll>> v(w,vector<ll>(h,init));

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;
using pll = pair<ll,ll> ;

const int mod = 1000000007;
constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0,1,-1,1,-1};
const int dx[] = {0,-1,0,1,1,-1,-1,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll a = inf,b = inf,c;
  rep(i,3){
  cin >> c;
  a = min(a,c);
  }
  rep(i,2){
    cin >> c;
    b = min(b,c);
  }
  cout << a + b - 50 << endl;
  return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <cstdio>
#include <iomanip>

using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;(i)>=0;(i)--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())

typedef long long ll;


int main(){

    int p=1e9,j=1e9;
    REP(i,3){
        int t; cin>>t;
        p=min(p,t);
    }
    
    REP(i,2){
        int t; cin>>t;
        j=min(j,t);
    }
    
    cout<<p+j-50<<endl;
    
    return 0;
}

C++: //============================================================================
// Name        : JOI.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;
int A,B,C,D,E;
int main() {
	cin>>A>>B>>C>>D>>E;
	int S=0,T=0;
	if(A<B && A<C)S=A;
	if(B<C && B<A)S=B;
	if(C<A && C<B)S=C;
	if(D<E)T=D;
	if(E<D || D==E)T=E;
	cout<<S+T-50<<endl;

	return 0;
}

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

int main(){
    int N,mn1=10000,mn2=10000;
    for(int i=0;i<3;i++){
        cin>>N;
        mn1=min(mn1,N);
    }
    for(int i=0;i<2;i++){
        cin>>N;
        mn2=min(mn2,N);
    }
    printf("%d\n",mn1+mn2-50);
    return 0;
}

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

int main(){
    vector<int> p, j;
    int b;
    for (int i = 0; i < 3; i++){
	cin >> b;
	p.push_back(b);
    }
    for (int i = 0; i < 2; i++){
	cin >> b;
	j.push_back(b);
    }

    cout << *min_element( p.begin(), p.end()) + *min_element( j.begin(), j.end()) - 50 << endl;
    
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<algorithm>
#include <string.h>

using namespace std;
int main(){
	int a,b,c,d,e,ans;
	cin>>a>>b>>c>>d>>e;
	ans=min(a,min(b,c))+min(d,e)-50;
	cout<<ans<<endl;
	
}