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++: //33
#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;
  cin >> a >> b >> c >> d >> e;
  cout << min(a,b) + min({c,d,e}) - 50 << endl;
}

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

using namespace std;

int min( int p, int q ) {
	if( p > q ) return q;
	return p;
}

int main(void){

	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	cout << min( min( a, b ) , c ) + min( d , e ) - 50 << endl;

    return 0;
}

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

//#define PI 3.141592653589

using namespace std;



int main()
{
	int pasta[3];
	int juice[2];
	
	for (int i=0; i<3; i++) cin >> pasta[i];
	for (int i=0; i<2; i++) cin >> juice[i];
	sort(pasta, pasta+3);
	sort(juice, juice+2);
	
	cout << pasta[0] + juice[0] - 50 << endl;
	
	//for (int i=0; i<3; i++) cout << pasta[i] << endl;
	
	return 0;
}

C++: #include<cstdio>
#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(min(a,b),c)+min(d,e)-50);
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a ; i++)
int main(void){
	int pa[3];
	int ju[2];
	rep(i,3)cin>>pa[i];
	rep(i,2)cin>>ju[i];
	sort(pa,pa+2);
	sort(ju,ju+1);
	cout<<pa[0] + ju[0] - 50 <<endl;
	
}

C++: #include <iostream>
using namespace std;
int main(){
  int pasta ,juice ,price=0 ,most ,min;
  cin >> min;
  for( int i=0 ; i<2 ; i++ ){
    cin >> pasta;
    if( pasta < min ){
      min = pasta;
    }
  }

  price += min;

  cin >> min;
  cin >> juice;

  if( min > juice ){
    min = juice;
  }

  price += min;
  price -= 50;

  cout << price << endl;
}

C++: #include <stdio.h>

int main(){
	int a[3], b[2], c[2], answer;
	scanf("%d%d%d%d%d",&a[0],&a[1],&a[2],&b[0],&b[1]);
	if (a[0]>a[1]){
		c[0] = a[1];	
	}
	else{
		c[0] = a[0];
	}

	if (c[0]>a[2]){
		c[0] = a[2];
	}

	if (b[0]>b[1]){
		c[1] = b[1];
	}
	else{
		c[1] = b[0];
	}
	answer = c[0] + c[1] - 50;
	printf("%d\n",answer);
	char i[1000];
	gets(i);
	gets(i);
return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){
	int p[3],ju[2];
	for(int i=0;i<3;++i) cin>>p[i];
	for(int j=0;j<2;++j) cin>>ju[j];
	int ans = 1e9;
	for(int i=0;i<3;++i){
		for(int j=0;j<2;++j){
			ans = min(p[i] + ju[j] - 50, ans);
		}
	}
  cout<<ans<<endl;
  return 0;
}

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

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

C++: #include<stdio.h>

int main()
{
	//freopen("C:\\Users\\j2402\\Desktop\\nyu.txt","r",stdin);
	//freopen("C:\\Users\\j2402\\Desktop\\syu.txt","w",stdout);
	
	int pasta[3] = {0};
	int ju[2] = {0};

	for(int i=0;i<3;i++)
	{
		scanf("%d",&pasta[i]);

		if(i ==1)
		{
			if(pasta[0] < pasta[1])
			{
				pasta[1] = pasta[0];
			}
		}
		if(i == 2)
		{
			if(pasta[1] > pasta[2])
			{
				pasta[1] = pasta[2];
			}
		}
	}



	for(int i=0;i<2;i++)
	{
		scanf("%d",&ju[i]);
	}

	if(ju[0] < ju[1])
	{
		ju[1] = ju[0];
	}

	printf("%d\n",(pasta[1] + ju[1]) - 50);

	return 0;
}

C++: #include<iostream>
using namespace std;
int p1, p2, p3, j1, j2;
int main(){
cin >> p1 >> p2 >> p3 >> j1 >> j2;
cout << min(min(p1, p2), p3) + min(j1, j2) - 50 << endl;
return ;
}

C++: #include<stdio.h>
int main(void)
{
	int a,s,d,f,g,i;
	f=10000;
	g=10000;
	for(i=1;i<=3;i++){
		scanf("%d",&a);
		if(f>=a){
			f=a;
		}
	}
	for(i=1;i<=2;i++){
		scanf("%d",&s);
		if(g>=s){
			g=s;
		}
	}
	printf("%d\n",f+g-50);
	return 0;
}

C++: #include<iostream>
#include<algorithm>
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 <bits/stdc++.h>

using namespace std;

#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define REP3(i, m, n) for(int i = m, i##_len=(n);i < i##_len;i++)
#define FORVEC(i, v) for(int i = 0;i < v.size();i++)

#define INF 1000000000
#define pb(a) push_back(a)
#define llong long long
#define vi vector<int>
#define P pair<int,int>
#define all(vec) (vec.begin()),(vec.end())

int main(){
	int p[3],jc[2],min=INF;
	REP(i,3)cin>>p[i];
	REP(i,2)cin>>jc[i];
	REP(i,3){
		REP(j,2){
			if(min>p[i]+jc[j])min=p[i]+jc[j];
		}
	}
	cout<<min-50<<"\n";
	return 0;
}

C++: #include<iostream>
int main() {
	int pasta[3];
	int juise[2];
	int min1=INFINITY, min2=INFINITY;
	for (int i = 0; i < 3; ++i){
		std::cin >> pasta[i];
		if (pasta[i] < min1)min1 = pasta[i];
	}
	for (int i = 0; i < 2; ++i) { std::cin >> juise[i]; if (juise[i] < min2)min2 = juise[i]; }
	std::cout << min1 + min2-50 << std::endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
	int a,b,c,d,e;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);
	if(c>=min(a,b)){
	printf("%d\n",min(a,b)+min(d,e)-50);
	}else{printf("%d\n",c+min(d,e)-50);}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
#include <sstream>
using namespace std;

#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second
#define mkp make_pair

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
static const int INF=1<<24;

template <class T>
void initvv(vector<vector<T> > &v,int a,int b, const T  &t = T()){
	v.assign(a,vector<T>(b,t));
}

//v.erase(unique(v.begin(),v.end()),v.end());

int main(){
	int a,b;
	cin>>a;
	rep(i,2){
		int t;
		cin>>t;
		a=min(a,t);
	}
	cin>>b;
	int t;
	cin>>t;
	b=min(b,t);
	cout<<a+b-50<<endl;
}

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

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

using namespace std;

int main()
{
    vector<int> P(3);
    vector<int> J(2);
    
    for(int i = 0; i < 3; i++)
        cin >> P[i];
    
    for(int i = 0; i < 2; i++)
        cin >> J[i];
    
    sort(P.begin(), P.end());
    sort(J.begin(), J.end());
    
    cout << P[0] + J[0] - 50 << endl;
    
    return 0;
}