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<stdio.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<stack>
#include<queue>
#include <set>
using namespace std;

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

	}
	else if (a=b>c)
	{
		cout <<c+min(d,e)-50<<endl;

	}	
	else if (a=c<b)
	{
		cout <<a+min(d,e)-50<<endl;

	}	
	else if (a=c>b)
	{
		cout <<b+min(d,e)-50<<endl;

	}	
	else if (b=c<a)
	{
		cout <<b+min (d,e)-50<<endl;
	}
	else if (b=c>a)
	{
		cout <<a+min(d,e)-50<<endl;
	}
	else if (a=b=c)
	{
		cout <<a+min(d,e)<<endl;
	}
                 
	
	
	
 
	
	return 0;
}

C++: #include <iostream>
using namespace std;
#define rep(i, n) for(int (i) = 0; (i) < (n); (i)++)

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

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

typedef long long ll;

using namespace std;

int mo[4]={0,1,0,-1};

int main(){
    int ans;
    int a,b,c,d,e;
    
    scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
    
    ans = min(a,min(b,c))+min(d,e)-50;
    
    printf("%d\n",ans);
    
    return 0;
}

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

using namespace std;

int main(){
  int pa,pb,pc,ja,jb;
  int total;

  cin >> pa;
  cin >> pb;
  cin >> pc;
  cin >> ja;
  cin >> jb;

  total = min({pa,pb,pc}) + min({ja,jb}) - 50;

  cout << total << endl;
  
  return 0;
}

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

int main(){
int buffer;
int pasta_min,juice_min;
std::vector<int> pasta;
std::vector<int> juice;

for(int i=0;i<3;i++){
  std::cin >> buffer;
  pasta.push_back(buffer);
}
for(i=0;i<2;i++){
  std::cin >> buffer;
  juice.push_back(buffer);
}
pasta_min = *std::min_element(pasta.begin(), pasta.end());
juice_min = *std::min_element(juice.begin(), juice.end());
std::cout << pasta_min+juice_min-50 << std::endl;
}

C++: #include<iostream>
using namespace std;
int main(){
  int i;
  int a[5];
  for(i=0;i<5;++i)
    cin>>a[i];
  cout<<min(min(a[0],a[1]),a[2])+min(a[3],a[4])-50<<endl;
  return 0;
}

C++: // 2013/09/10 Tazoe

#include <iostream>
using namespace std;

int main()
{
	int p1, p2, p3, j1, j2;
	cin >> p1;
	cin >> p2;
	cin >> p3;
	cin >> j1;
	cin >> j2;

	int p = p1;
	if(p>p2){
		p = p2;
	}
	if(p>p3){
		p = p3;
	}

	int j = j1;
	if(j>j2){
		j = j2;
	}

	int s = p+j-50;

	cout << s << '\n';

	return 0;
}

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

int main(){
	int p[3], j[2];
	int ans = 0;
	for(int i=0; i < 3; i++) cin >> p[i];
	for(int i=0; i < 2; i++) cin >> j[i];
	sort(p, p+3);
	sort(j, j+2);
	cout << p[0] + j[0] - 50 << endl;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
  int a,b,c,d,e,f,g;
  cin >> a >> b >> c >> d >> e;
  f=min(a,b);
  f=min(f,c);
  g=min(d,e);
  cout << f+g-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 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 -50<< endl;
	}
	if (e>=f&&f<=d&&h<= g)
	{
		cout << f + h -50<< endl;
	}
	


	
	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);
	}
	int t;
	cin>>t;
	b=min(b,t);
	cout<<a+b-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-50;
printf("%d\n",t1);
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,min(b,c))+min(d,e)-50<<endl;
}

C++: #include <iostream>
#include <climits>
#define REP(i, a, n) for(int i = a; i < n; i++)
using namespace std;


int P[3], J[2];

int main(void) {
  REP(i, 0, 3) cin >> P[i];
  REP(i, 0, 2) cin >> J[i];

  int ans = INT_MAX;
  REP(i, 0, 3) {
    REP(j, 0, 2) {
      ans = min(ans, P[i] + J[j] - 50);
    }
  }

  cout << ans << endl;

  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<string>
#include<sstream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cctype>
#include<climits>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
#define P pair<int, int>
const int INF = INT_MAX / 2;

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

    return 0;
}

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

int main(){
int a,b,c,d,e,f;
cin>>a>>b>>c>>d>>e;
if(a>b){
if(b>c){
f=c;
}
if(b<c){
f=b;
}
}
else{
if(a<c){
f=a;
}
if(a>c){
f=c;
}
}

if(d<e){
cout<<f+d-50;
}

if(d>e){
cout<<f+e-50;
}

return 0;
}

C++: #include<iostream>
#include<cmath>
#include<string>

using namespace std;
int main(){
    int a[3],b[2];
    cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1];
    int min=4000;
    for(int i=0;i<3;i++){
        for(int j=0;j<2;j++){
            if(a[i]+b[j]<min){
                min=a[i]+b[j];
            }
        }
    }
    cout << min-50 << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int a, b, c, d, e;
	cin >> a >> b >> c >> d >> e;
	int minPasta = a;
	if(minPasta > b)
	{
		minPasta = b;
	}
	if(minPasta > c)
	{
		minPasta = c;
	}
	int minJuice = d;
	if(minJuice > e)
	{
		minJuice = e;
	}
	cout << minPasta + minJuice - 50 << endl;
}

int main()
{
	solve();
	return(0);
}