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<cstdio>
#include<algorithm>
using namespace std;
int main(void)
{
	int p1,p2,p3,j1,j2;
	int mnp,mnj,kin;
	scanf("%d %d %d %d %d",&p1,&p2,&p3,&j1,&j2);
	mnp=min(min(p1,p2),p3);
	mnj=min(j1,j2);
	kin=mnp+mnj-50;
	printf("%d\n",kin);
	return 0;
}

C++: #include<iostream>
#include <stdio.h>
using namespace std;
 
int main(){
	int a,b,c,d,e;
	cin>>a>>b>>c>>d>>e;
	int f;
	int g;
	if(a<b&&a<c){
		f=a;}else{
			if(b<a&&b<c){
				f=b;}else{
				f=c;}}
		if(d<e){
			g=d;}else{
			g=e;}
			cout<<f+g-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 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(ll i=(n)-1;i>=0;i--)
#define range(i,a,n) for(ll 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 sum(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));}
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>void tf(bool b,S t,T f){if(b)puta(t);else puta(f);}
void YN(bool b){tf(b,"YES","NO");}
void Yn(bool b){tf(b,"Yes","No");}
void yn(bool b){tf(b,"yes","no");}
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;}
template<class S>auto&operator>>(istream&is,vector<S>&t){for(S&a:t)cin>>a;return is;}

/*他のライブラリを入れる場所*/


int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	vl a(3),b(2);
	cin>>a>>b;
	puta(min(a)+min(b)-50);
	return 0;
}

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

int main() {
	int pas[3] = {}, juice[2] = {};
	int pm = 0, jm = 0;
	std::cin >> pas[0] >> pas[1] >> pas[2] >> juice[0] >> juice[1];

	pm = std::min({pas[0],pas[1],pas[2]});
	jm = std::min(juice[0],juice[1]);

	std::cout << pm + jm - 50 << std::endl;

	return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  vi a(3), b(2);
  rep(i, 3) cin >> a[i];
  rep(i, 2) cin >> b[i];
  sort(all(a)), sort(all(b));
  cout << a.front() + b.front() - 50 << endl;
}

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

using pii = pair<int, int>;
using vi = vector<int>;
using ll = long long;

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

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

int main(){
  int p1,p2,p3,p4,d1,d2,ans,p;
  cin >> p1 >> p2 >> p3 >> d1 >> d2;
  p4 = min(p1,p2);
  p = min(p4,p3);
  ans = min(d1,d2) + p -50;
  cout << ans << endl;
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a1,a2,a3,b1,b2;
  int ans,h1,h2;
  cin >> a1 >> a2 >> a3 >> b1 >> b2;
  h1 = min(a1,a2);
  h1 = min(h1,a3);
  h2 = min(b1,b2);

  ans = h1 + h2 - 50;
  cout << ans << endl;
  return 0;
}

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>
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 0;
}

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

int main(){
	int p1,p2,p3,j1,j2,pm,jm;
	pm=jm=2100;
	cin>>p1>>p2>>p3>>j1>>j2;
	pm=min(pm,p1);
	pm=min(pm,p2);
	pm=min(pm,p3);
	jm=min(jm,j1);
	jm=min(jm,j2);
	cout<<pm+jm-50<<endl;
	return 0;
}

C++: #include <cstdio>
int main() {
	int pasta,juice,temp;
	scanf("%d",&pasta);
	for(int i=0;i<2;i++) {
		scanf("%d",&temp);
		if(pasta>temp)pasta=temp;
	}
	scanf("%d",&juice);
	scanf("%d",&temp);
	if(juice>temp)juice=temp;
	printf("%d\n",pasta+juice-50);
}

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

C++: import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.LinkedList;


public class Main {

	public static void main(String[] args) {
		Main main = new Main();
		main.lunchMinimumValueCalculation();
		return;
	}
	
	//昼食の代金の最小値を求める
	private void lunchMinimumValueCalculation() {
		
		BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); //標準入力
		
		LinkedList<Integer> pastaPriceList = new LinkedList<Integer>();
		LinkedList<Integer> juicePriceList = new LinkedList<Integer>();
		
		try {
			
			for (int i = 0; i < 3; i++) {
				String inputStr = bufferedReader.readLine();
				pastaPriceList.add(Integer.parseInt(inputStr));
			}
			
			for (int i = 0; i < 2; i++) {
				String inputStr = bufferedReader.readLine();
				juicePriceList.add(Integer.parseInt(inputStr));
			}
			
			Collections.sort(pastaPriceList);
			Collections.sort(juicePriceList);
			
			int pastaPriceNum = pastaPriceList.get(0);
			int juicePriceNum = juicePriceList.get(0);
			
			System.out.println((pastaPriceNum + juicePriceNum) - 50);
			
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}
		
	}
}