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<string>
using namespace std;

int main(){
	/*
	int a,b,c,d,e;

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

	int x;

	if(a > 0){
		x = e*(b-a);
	}
	if(a == 0){
		x = e*b + d;
	}
	if(a < 0){
		x = -c*a + e*b + d;
	}

	cout << x <<endl;
	*/

	/*
	int a,b,c,d,e,f;
	cin >> a >> b >> c >> d >> e >> f;
	int m,n;
	int x = a + b + c + d + e + f;


	
	if(e<f)
	{
		x = x - e;
		if(a<b)
		{
			if(a<c)
			{
				if(a<d)
				{
					cout << x-a << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
			else
			{
					if(c<d)
				{
					cout << x-c << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
		}
		else
		{
			if(b<c)
			{
				if(b<d)
				{
					cout << x-b << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
			else
			{
					if(c<d)
				{
					cout << x-c << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
		}
	}
	else
	{
		x = x - f;
		if(a<b)
		{
			if(a<c)
			{
				if(a<d)
				{
					cout << x-a << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
			else
			{
					if(c<d)
				{
					cout << x-c << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
		}
		else
		{
			if(b<c)
			{
				if(b<d)
				{
					cout << x-b << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
			else
			{
					if(c<d)
				{
					cout << x-c << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
		}
	}
	*/
/*
	int n;
	cin >> n;
	int a;
	cin >> a;
	int max = a,min = a;
	int i = 1;
	while(i<n){
		cin >> a;
		if(a > max){
			max = a;
		}
		if(a < min){
			min = a;
		}
		i++;
	}
	cout << max << endl << min << endl;
	*/
	/*
	string s;
	cin >> s;
	int j,o,i;
	for(int i;i < s.size;i++){
		
	}
	*/
	/*
	int n;
	cin >> n;
	int A;
	int X[100000];
	int n=0;
	for(int i=0;i<n;i++){
		cin >> A;
		
	}
	*/
	/*
	int a,b,c,d,p;
	cin >> a >> b >> c >> d >> p;
	int X,Y=b;

	X = a*p;
	
	if(p>c){
		Y += d*(p-c);
	}

	if(X > Y){
		cout << Y << endl;
	}
	else{
		cout << X << endl;
	}
	*/ 
	/*
	int l,a,b,c,d;
	cin >> l >> a >> b >> c >> d;

		int Jap = a/c;
		if(a%c != 0){
			Jap += 1;
		}
		int Math = b/d;
		if(b%d != 0){
			Math += 1;
		}

	int day = Jap;
	if(Jap < Math) {
		day = Math;
	}

	cout << l - day << endl;
	*/

	int pa,pb,pc,ja,jb;
	cin >> pa >> pb >> pc >> ja >> jb;
	
	if(pa > pb){
		pa = pb;
	}
	if(pa > pc){
		pa = pc;
	}

	if(ja > jb){
		ja = jb;
	}

	cout << pa + jb -50 << endl;

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <sstream>
#include <map>
#include <set>

#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<30
#define pb push_back
#define mp make_pair

using namespace std;
typedef long long ll;
typedef pair<int,int> P;

int main() {
	vector<int> a(3), b(2);
	rep(i, 3) cin >> a[i];
	rep(i, 2) cin >> b[i];

	int ans = INF;
	rep(i, 3) {
		rep(j, 2) {
			ans = min(ans, a[i] + b[j] - 50);
		}
	}

	cout << ans << endl;

	return 0;
}

C++: #include<iostream>

using namespace std;

int main(void){
  int input,pasta,juice;
  cin>>pasta;
  cin>>input;
  if(input<pasta) pasta=input;
  cin>>input;
  if(input<pasta) pasta=input;
  cin>>juice;
  cin>>input;
  if(input<juice) juice=input;
  cout<<(juice+pasta)-50<<endl;
  return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int a,b,i,x=-50;
	scanf("%d",&a);
	for(i=0;i<2;i++)
	{
		scanf("%d",&b);
		if(b<a)
			a=b;
	}
	x+=a;
	scanf("%d\n%d",&a,&b);
	if(b<a)
		printf("%d\n",x+=b);
	else
		printf("%d\n",x+=a);

  return 0;
}

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

int main() {
	int pasuta[3],juusu[2],pmin = 0,jmin = 0;
	for(int i = 0; i < 3; i++){
		cin >> pasuta[i];
	}
	pmin = pasuta[0];
	for(int i = 0; i < 2; i++){
		cin >> juusu[i];
	}
	jmin = juusu[0];
	for(int j = 0; j < 3; j++){
		if(pmin > pasuta[j]){
			pmin = pasuta[j];
		}
	}
	for(int j = 0; j < 2; j++){
		if(jmin > juusu[j]){
			jmin = juusu[j];
		}
	}
	cout << pmin + jmin - 50 <<endl;
	return 0;
}

C++: #include<stdio.h>
int main(){
	int pasta[3],juice[2],i,i2,max=9999;
	for(i=0;i!=3;i++){
		scanf("%d",&pasta[i]);
	}
	for(i=0;i!=2;i++){
		scanf("%d",&juice[i]);
	}
	for(i=0;i!=3;i++){
		for(i2=0;i2!=2;i2++){
			if(max>pasta[i]+juice[i2]-50){
				max=pasta[i]+juice[i2]-50;
			}
		}
	}
	printf("%d\n",max);
}

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

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

using namespace std;

int main(void){
	int A, B, C, D, E;
	cin >> A >> B >> C >> D >> E;
	cout << min(D,E)+min(A,min(B,C))-50 << endl;
}

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
#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;

//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 d;
	int e;
	int f;
	int g;
	int h;
	cin >> d;
	cin >> e;
	cin >> f;
	cin >> g;
	cin >> h;
	
	if (d>=e&&e<=f&&g<=h)
	{
		cout << e + g - 50 << endl;
	}
	else if (d>=e&&e<f&&h<=g)
	{
		cout << e + h - 50 << endl;
	}
	if (e>=d&&d<=f&&g<=h)
	{
		cout << d + g - 50 << endl;
	}
	if (e>=d&&d<=f&&h<=g)
	{
		cout << d + h - 50 << endl;
	}
	if (e>=f&&f<=d&&g<=h)
	{
		cout << f + g << endl;
	}
	if (e>=f&&f<=d&&h<= g)
	{
		cout << f + h << endl;
	}
	


	return 0;
}

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];
   }
   for(int n = 0; n < 2; n++){
     scanf("%d",&i1[2]);
     if(i1[1] > i1[2]) i1[1] = i1[2];
   }
   printf("%d\n",(i1[0] + i1[1]) - 50);
}