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>
using namespace std;
int pasta[3];
int drink[2];
const int INF=1<<20;
int main(){
	int p=INF;
	int d=INF;
	for(int i=0;i<3;i++){
		cin>>pasta[i];
		p=min(p,pasta[i]);
	}
	for(int i=0;i<2;i++){
		cin>>drink[i];
		d=min(d,drink[i]);
	}
	cout<<d+p-50<<endl;
	return 0;
}

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

#define gcu getchar_unlocked
#define ii inline int in
#define is inline bool scan
ii(int c) {
	int n = 0;
	bool minus = false; if (c == '-') minus = true, c = gcu();
	do {n = 10 * n + (c - '0'), c = gcu();} while (c >= '0');
	//return n; }
	return minus ? -n : n; }
ii() {return in(gcu());}
is(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
is(char &c){c=gcu();gcu();return c!=EOF;}
//is(string &s){int c;
//	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
#undef ii
#define pcu putchar_unlocked
template <typename T>
void out(T n) {
	static char buf[20];
	char *p = buf;
	if(n < 0) pcu('-'), n *= -1;
	if (!n) *p++ = '0';
	else while (n) *p++ = n % 10 + '0', n /= 10;
	while (p != buf) pcu(*--p); }
void out(const char *s){while(*s)pcu(*s++);}
void out(char c){pcu(c);}
//void out(string &s){for (char c: s) pcu(c);}
template <typename head, typename... tail>
void out(head&& h, tail&&... t){out(h);out(move(t)...);}
//template <typename T>
//void out(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);out('\n');}
#undef svo

void choice (int &price) {
	price = min(price, in());
}

int main() {
	int sum = 0;
	for (int n : {3, 2}) {
		int p = INT_MAX;
		for (int i = 0; i < n; i++)
			choice(p);
		sum += p;
	}
	out(sum - 50, '\n');
}

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

int min1(int w, int x){
  if(w < x) return w;
  else return x;
}
int min2(int y, int z){
  if(y < z) return y;
  else return z;
}

int main(){
  int a, b, c;
  int d, e;
  cin >> a >> b >> c;
  cin >> d >> e;
  
  cout<<min1(min1(a,b),c)+min2(d,e)-50<<endl;

  return 0;
}

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

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<cstring>
#include<set>
#include<map>
#include<vector>
#include<cmath>
#include<queue>
#include<cstdio>
#include<cstdlib>
#define reep(n1,n2,n3) for(int n1=n3;n1<n2;n1++)
#define rep(n1,n2) reep(n1,n2,0)
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define INF 1e9
using namespace std;
typedef long long int lint;
typedef long double ld;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef vector<pair<int,int> > vp;
typedef pair<int,int> pi;
typedef pair<int,pair<int,int> > pii;
typedef vector<string> vs;
const double PI  = acos(-1.0);
int main(){
    int p=INF,j=INF;
    rep(i,3){
        int a;
        cin>>a;
        p=p<a?p:a;
    }
    rep(i,2){
        int a;
        cin>>a;
        j=j<a?j:a;
    }
    cout<<p+j-50<<endl;
}

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

int main(){
    int pasta[3];
    int juice[2];
    int min = 1000000;
    cin >> pasta[0] >> pasta[1] >> pasta[2] >> juice[0] >> juice[1];

    for(int i=0; i<3; ++i){
        for(int j=0; j<2; ++j){
            int sum = pasta[i] + juice[j] - 50;
            if(min > sum) min = sum;
        }
    }
    cout << min << endl;
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;
  a=min(a,b);
  cout<<min(a,c)+min(d,e)-50<<endl;
}

C++: #include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n;i>=0;i--)
#define INF 100000005
#define MAX 1002
#define mp make_pair
#define pb push_back
#define fi first
#define se second
using namespace std;
//__gcd(a,b), __builtin_popcount(a);

int solve(){
	
}

int main(){
	int a[3], b[2];
	scanf("%d%d%d%d%d",&a[0],&a[1],&a[2],&b[0],&b[1]);
	sort(a, a+3);sort(b, b+2);
	printf("%d\n", a[0]+b[0]-50);
	return 0;
}

C++: #include <bits//stdc++.h>
using namespace std;
int main(void){
    int a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    int ans;
    if(a<b&&a<c)
    ans=a;
    else if(b<c)
    ans=b;
    else
    ans=c;
    if(d<e)
    ans=ans+d;
    else
    ans=ans+e;
    cout<<ans-50<<endl;
}

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

#define X first
#define Y second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define rep(i, a, b) for (unsigned i = (a); i <= (b); ++i)
#define per(i, a, b) for (unsigned i = (a); i >= (b); --i)

using namespace std;

using I = int;
using L = long;
using F = float;
using S = string;
using SS = stringstream;
using C = char;
using LL = long long;
using VI = vector<int>;
using VL = vector<long>;
using VF = vector<float>;
using VS = vector<string>;
using PLL = pair<long, long>;
using PLF = pair<long, float>;
using PLS = pair<long, string>;
using PSL = pair<string, long>;
using PSF = pair<string, float>;
using PSS = pair<string, string>;
using MLL = map<long, long>;
using MLF = map<long, float>;
using MLS = map<long, string>;
using MSL = map<string, long>;
using MSF = map<string, float>;
using MSS = map<string, string>;

const long kMax2 = 109;
const long kMax3 = 1009;
const long kMax4 = 10009;
const long kMax5 = 100009;
const long kMax6 = 1000009;
const long kInfI = 0x3F3F3F3F;
const float kInfF = 1e15;

L TempVar(L h, L s, L t) {
  if (h > 0) { return -s * h; }
  else { return -t * h; }
}


int main(int argc, char const *argv[]) {
  L n = kMax4, m = kMax4;
  L ans = 0;
  VL v;
  for (unsigned i = 0; i < 3; i++) {
    L a;
    cin >> a;
    if (a < n) { n = a; }
  }
  for (unsigned i = 0; i < 2; i++) {
    L a;
    cin >> a;
    if (a < m) { m = a; }
  }
  cout << n + m - 50 << "\n";
  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	int pasta[3],juice[2];
	rep(i,3)cin>>pasta[i];
	rep(i,2)cin>>juice[i];
	vector<int> ans;
	rep(i,3)rep(j,2){
		ans.push_back(pasta[i]+juice[j]-50);
	}
	sort(ans.begin(),ans.end());
	cout<<ans[0]<<endl;
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>	
#include<cmath>
using namespace std;
int main() {
	int n, a, sum = 2001, num = 2001;
	for (int h = 0; h < 3; h++) {
		cin >> n;
		sum = min(sum, n);
	}
	for (int h = 0; h < 2; h++) {
		cin >> a;
		num = min(num, a);
	}
	cout << sum + num - 50 << endl;
}

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

using namespace std;

int main(void)
{	

	int pasta, juice, tmp;
	cin >> pasta;
	for (int i = 0; i < 2; i++)
	{
		cin >> tmp;
		if (tmp < pasta)
			pasta = tmp;
	}
	cin >> juice;
	cin >> tmp;
	if (tmp < juice)
		juice = tmp;
	cout << pasta + juice - 50 << endl;

}

C++: #include<stdio.h>
#include<stdlib.h>

int main(void){
	int p=10000;
	int ju=10000;
	
	for(int i = 0; i < 3; i++){
		int t;
		scanf("%d", &t);
		p = min(p,t);
	}
	
	for(int i = 0; i < 2; i++){
		int t;
		scanf("%d", &t);
		ju = min(ju,t);
	}
	
	printf("%d\n", ju+p-50);
	return 0;
}