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 main() {
int a, sum = 0;
for (int i = 0; i < 4; i++) {
cin >> a;
sum += a;
}
cout << sum / 60 << endl << sum % 60 << endl;
}*/
#include<iostream>
using namespace std;
int main() {
int min1 = 2000, min2 = 2000, a;
for (int i = 0; i < 3; i++) {
cin >> a;
if (min1 > a)min1 = a;
}
for (int i = 0; i < 2; i++) {
cin >> a;
if (min2 > a)min2 = a;
}
cout << min1 + min2-50 << endl;
}
/*#include<iostream>
using namespace std;
int main() {
int a[5], b[2] = {1}, sum = 0;
for (int i = 0; i < 5; i++) {
cin >> a[i];
}
while (a[1] > a[3]*b[0]) {
b[0]++;
//cout << "bakatoy" << endl;
}
while (a[2] > a[4]*b[1]) {
b[1]++;
//cout << "bakatoy" << endl;
}
if (b[0] > b[1]) {
cout << a[0]-b[0] << endl;
}
else {
cout << a[0]-b[1] << endl;
}
}*/
/*#include<iostream>
using namespace std;
int main() {
	int a, sum=0;
	for (int i = 0; i<5; i++) {
		cin >> a;
		if (a < 40)a = 40;
		sum += a;
	}
	cout << sum / 5 << endl;
}*/

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <map>
#include <queue>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using namespace std;

template<class T>
constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;

int main() {
    int a, b, c, d, e;
    cin >> a >> b >> c >> d >> e;
    cout << min({a, b, c}) + min({d, e}) -50 << "\n";
    return 0;
}

C++: #include <iostream>

#define INF 100000000

using namespace std;

int main() {

  int pasta[5],juice[5];

  int min_pasta,min_juice;


  for(int i=0;i<3;i++) cin >> pasta[i];

  for(int i=0;i<2;i++) cin >> juice[i];

  min_pasta=INF;

  for(int i=0;i<3;i++) {

    if(min_pasta>pasta[i]) min_pasta=pasta[i];

  }

  min_juice=INF;

  for(int i=0;i<2;i++) {

    if(min_juice>juice[i]) min_juice=juice[i];

  }

  cout << min_pasta+min_juice-50 << endl;

  return 0;

}

C++: #include <iostream>
using namespace std;
int main(){
  int pas,ju,m =2001; 
  for(int i = 0 ; i < 3 ; i++){
      cin >> pas; 
      if(pas < m)m = pas;
  }
  int n = 2001;
  for(int i = 0 ; i < 2 ; i++){
    cin >> ju;
    if(ju < n)n = ju;
}

  cout << m+n-50 << endl;
  return 0;
}

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

vector<int> read(int n)
{
	vector<int> v(n);
	for (int i = 0; i < n; ++i)
		scanf("%d\n", &v[i]);
	sort(v.begin(), v.end());
	return v;
}

int main()
{
	const vector<int> pasta = read(3);
	const vector<int> juice = read(2);
	const int res = pasta[0] + juice[0] - 50;
	printf("%d\n", res);
	return 0;
}

C++: #include <cstdio>

using namespace std;

int main()
{
	int pas, pas_min;
	int jui, jui_min;
	int i;
	bool flag = true;
	
	for (i = 0; i < 3; i++){
		scanf("%d", &pas);
		if (flag){
			pas_min = pas;
			flag = false;
		}
		if (pas_min > pas){
			pas_min = pas;
		}
	}
	
	flag = true;
	
	for (i = 0; i < 2; i++){
		scanf("%d", &jui);
		if (flag){
			jui_min = jui;
			flag = false;
		}
		if (jui_min > jui){
			jui_min = jui;
		}
	}
	
	printf("%d\n", pas_min + jui_min - 50);
	
	return (0);
}

C++: #include <iostream>


using namespace std;

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

C++: #include <stdio.h>

int main()
{
  int i,j;
  int pasta[3];
  int juse[2];
  int min1,min2;
  for(i=0;i<3;i++)
    {
      scanf("%d",&pasta[i]);
}

min1=pasta[0];

 for(i=1;i<3;i++)
    {
      
      if(min1>pasta[i])min1=pasta[i];
}

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

min2=juse[0];
 
for(i=1;i<3;i++)
    {      
      if(min2>juse[i])min2=juse[i];
} 

 printf("%d\n",min1+min2-50);

 return 0;

}

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

int main() {
  vector<int> pasta(3, 0);
  vector<int> juice(2, 0);

  for(int i = 0; i < 3; i++) {
    cin >> pasta[i];
  }
  for(int i = 0; i < 2; i++) {
    cin >> juice[i];
  }

  sort(pasta.begin(), pasta.end());
  sort(juice.begin(), juice.end());

  cout << pasta[0]+juice[0]-50 << endl;

  return 0;
}

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

C++: #include<iostream>
using namespace std;
int main(){
  int p[3],ju[2];
  int min=4000,nowmin=0;
  for(int i=0;i<3;i++){
    cin>>p[i];
  }for(int i=0;i<2;i++){
    cin>>ju[i];
  }
  for(int i=0;i<3;i++){
    for(int j=0;2>j;j++){
      nowmin=p[i]+ju[j]-50;
      if(nowmin<min){
	min=nowmin;
      }
    }
  }
  cout<<min<<endl;
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
  int data[5];
  for(int i = 0;i < 5;i++)cin >> data[i];
  cout << *min_element(data,data + 3) + *min_element(data + 3,data + 5) - 50 << endl;
  return 0;
}

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

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

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

C++: #include<iostream>
using namespace std;
int main(){
  int ans,pasuta,juice,most1=10000,most2=10000;
  for(int i=0;i<3;i++){
    cin >> pasuta;
    if(most1>pasuta){
      most1=pasuta;
    }
  }
  for(int i=0;i<2;i++){
    cin >> juice;
    if(most2>juice){
      most2=juice;
    }
  }
  ans=most1+most2-50;
  cout << ans << endl;
  return (0);
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(),(x).end()
const int mod=1000000007,MAX=1500003,INF=1<<30;

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 a[10];

  for(int i=0;i<5;i++) cin >> a[i];

  a[0] = min(a[0],a[1]);

  cout << min(a[3],a[4]) + min(a[0],a[2]) - 50 << endl;

}

C++: #include<stdio.h>

int main(){

int x,y;int t1=2000,t2=2000;

for(int i=0;i<3;i++)
{scanf("%d",&x);if(t1>x)t1=x;}

for(int i=0;i<2;i++)
{scanf("%d",&y);if(t2>y)t2=y;}


t1=t2+t1;
printf("%d\n",t1);
return 0;
}

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

int main(){
	int i,a,b,c;
	for(i = 0;i < 3;++i){
		cin >> a;
		if(i == 0) b = a;
		else{
			if(a < b) b = a;
		}

	}
	for(i = 0;i < 2;++i){
		cin >> a;
		if(i == 0) c = a;
		else {
			if(a < c) c = a;
		}
	}
	cout << b + c - 50 << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
 
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
 
int main(){
    int p[3],j[2];
    REP(i,3)
        scanf("%d",p + i);
    REP(i,2)
        scanf("%d",j + i);
 
    int mini = 1000000000;
    REP(i,3){
        REP(k,2){
            mini = min(p[i] + j[k],mini);
        }
    }
 
    printf("%d\n",mini - 50);
    return 0;
}