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 <algorithm>

using namespace std;

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

C++: #include<stdio.h>
int main(void)
{
	int a,b,i,j;
	int s,min,min2;
	
	min=2000;
	min2=2000;
	for(i=0;i<3;i++){
		scanf("%d",&a);
		if(min>a){
			min=a;
		}
	}
	for(j=0;j<2;j++){
		scanf("%d",&b);
		if(min2>b){
			min2=b;
		}
	}
//	printf("min=%d %d\n",min,min2);
	s=min+min2-50;
	printf("%d\n",s);
	return 0;	
}

C++: #include <iostream>
int main(){
	int p[3], j[2];
	int pmin = 2000, jmin = 2000;
	for (int i = 0; 1 < 3; i++) {
		std::cin >> p[i];
		if (p[i] < 2000) {
			pmin = p[i];
		}
	}
	for (int i = 0; 1 < 2; i++) {
		std::cin >> j[i];
		if (j[i] < 2000) {
			jmin = j[i];
		}
	}
	std::cout << jmin + pmin - 50 << std::endl;

	return 0;
}

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

using namespace std;

typedef pair<int,int> pii;

#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)


int main(){
	int p,d,n;
	p=d=2000;
	rep(i,5){
		scanf("%d",&n);
		if(i<3)p=min(p,n);
		else d=min(d,n);
	}
	printf("%d\n",p+d-50);
	return 0;
}

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<iostream>
#include<algorithm>
using namespace std;
int main(){
    int A,B,C,D,E;
    cin>>A>>B>>C>>D>>E;
    cout<<min({A,B,C})+min(D,E)-50<<endl;
    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 0;
}

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

int main(){
	int p[5], d[5], t, a;

	cin>>p[1]>>p[2]>>p[3]>>d[1]>>d[2];

	
	t = min(p[1], p[2]);
	a = min(t, p[3]);
	
	a += min(d[1], d[2]);
	
	cout<<a - 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;
	if(a>b)swap(a,b);
	if(b>c)swap(b,c);
	if(a>b)swap(a,b);
	if(d>e)swap(d,e);
	cout<<a+d-50<<endl;
	return 0;
	}

C++: #include<iostream>
using namespace std;
int main(void){
	int a[5000], b, c, g = 0, h = 0, i, g1[5000]={0}, g2[5000]={0};
	for(i=0;i<3;i++) cin >> a[i];
	cin >> b >> c;
	for(i=0;i<3;i++){	
		g1[i] = a[i] + b - 50;
		g2[i] = a[i] + c - 50;
	}
	if(g1[0] < g1[1]) g = g1[0];	
	else g = g1[1];
	if(g > g1[2]) g = g1[2];
	if(g2[0] < g2[1]) h = g2[0];	
	else h = g2[1];
	if(h > g2[2]) h = g2[2];
	if(g < h) cout << g;
	else cout << h << endl;
 	return 0;
}

C++: #include<cstdio>
using namespace std;
int main(){
	int min=2000,min2=2000,pasta,drink,cnt;
	for(cnt=0;cnt<5;cnt++){
		if(cnt<3){
//			cin << pasta;
			scanf("%d",&pasta);
			if(min>pasta){
				min=pasta;
			}
		}
		else{
//			cin << drink;
			scanf("%d",&drink);
			if(min2>drink){
				min2=drink;
			}
		}
	}
	printf("%d\n",min+min2-50);
}

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 <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;


int main() {
	int a[3];
	int b[2];
	for (int i = 0; i < 3; i++) cin >> a[i];
	for (int i = 0; i < 2; i++) cin >> b[i];

	sort(a, a + 3);
	sort(b, b + 2);

	cout << a[0] + b[0] - 50 << endl;
	
}

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

int pasta[3], juice[2];
int ans;

int main(void) {
	scanf("%d%d%d%d%d", &pasta[0], &pasta[1], &pasta[2], &juice[0], &juice[1]);
	printf("%d\n", std::min(pasta[0], std::min(pasta[1], pasta[2])) + std::min(juice[0], juice[1]) - 50);
	return 0;
}

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

int main(){
    int p[5]={0},ja,jb,ans=0;
    cin >>p[1]>>p[2]>>p[3]>>ja>>jb;
    sort(p, p+4);
    ans+=p[1];
    if(ja>jb)ans+=jb;
    else ans+=ja;
    ans-=50;
    cout <<ans<<endl;
    return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<string>
#include<math.h>

using namespace std;

int min(int* rep,bool isPasta) {
	int length;
	if (isPasta)length = 3;
	else length = 2;

	int min = rep[0];

	for (int i = 1; i < length; i++) {
		if (min > rep[i]) {
			min = rep[i];
		}
	}
	return min;

}


int main(){

	int pasta[3];
	int juice[2];

	cin >> pasta[0] >> pasta[1] >> pasta[2] >> juice[0] >> juice[1];

	int minPasta = min(pasta,true);
	int minJuice = min(juice, false);

	cout << minPasta + minJuice - 50 << endl;



	//system("pause");
    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 0;
}

C++: #include <iostream>
using namespace std;
int main () {
int a,b,c,d;
cin>>a;
for(int i=0;i<2;i++){
cin>>b;
if(a>b){
a=b;
}}
cin>>c>>d;
if(c>d){
c=d;
}
cout<<a+c-50<<endl;
return 0;
}

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

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int p[3];
	int j[2];
	for (int k = 0; k < 3; k++){
		int b;
		cin >> b;
		p[k] = b;
	}
	for (int i = 0; i < 2; i++)
	{
		int a;
		cin >> a;
		j[i] = a;
	}

	sort(j, j + 2);
	sort(p, p + 3);
	cout << j[0] + p[0] - 50 << endl;
	return 0;
}

C++: //
//  main.cpp

#include <iostream>
using namespace std;


int main(){	
	int pastamin = 1000000;
	int juicemin = 1000000;
	int input;
	for(int i=0;i<3;i++){
		cin >> input;
		pastamin = min(input,pastamin);
	}
	for(int i=0;i<2;i++){
		cin >> input;
		juicemin = min(input,juicemin);
	}
	
	cout << pastamin + juicemin - 50 << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: #include <bits/stdc++.h>
using namespace std;
// #define int long long
typedef long long ll;
typedef pair<int,int> pii;
#define ITR(v,c) for(auto v=begin(c);v!=end(c);v++)
#define FOR(v,a,n) for(int v=a;v<(int)(n);v++)
#define FORE(x,arr) for(auto &x:arr)
#define REP(v,n) FOR(v,0,n)
#define RREP(v,n) for(int v=(int)(n);v>=0;v--)
#define ALL(c) begin(c),end(c)
const int DX[4]={0,1,0,-1}, DY[4]={-1,0,1,0};
const int INF = 1e9;
const ll INFLL = 1e18;
template<class T,class U>ostream&operator<<(ostream &os,const pair<T,U> &p){
    os<<"("<<p.first<<","<<p.second<<")";return os;}
template<class T>ostream&operator<<(ostream &os,const vector<T> &v){
    ITR(i,v)os<<*i<<(i==end(v)-1?"":" ");return os;}
//------------------------------------------------------------------------------

signed main() {
    int ans=0;
    int m=INF;
    REP(j,3) {
        int a;
        cin>>a;
        m=min(m,a);
    }
    ans+=m;
    m=INF;
    int a,b;
    cin>>a>>b;
    ans+=min(a,b);
    cout<<ans-50<<endl;
    return 0;
}