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<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int a=2000,b=2000;
  for(int i=0,k;i<3;i++){
    cin>>k;
    a=min(a,k);
  }
  for(int i=0,k;i<2;i++){
    cin>>k;
    b=min(b,k);
  }
  cout<<a+b-50<<endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <limits>
typedef long long ll;
#define REP(i,n)   for(int i=0; i<(int)(n); ++i)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); ++i)

#define in cin
#define out cout
#define pb push_back
using namespace std;

int main(){
	int a[3], b[2];
	REP(i, 3)in >> a[i];
	REP(i, 2)in >> b[i];
	int ans = min(min(a[0],a[1]),a[2]) + min(b[0],b[1]) - 50;
	out << ans<<endl;
	return 0;

}

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

	int a,b,c,d,e,k;
	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);}
	
	k=a+d-50;

	cout<<k<<endl;

	return 0;
	}

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

int main(int argc, const char * argv[]) {
    
    int pasta[3],juuce[2],min;
    int sum;
    
    min=100000000;
    
    for(int i=0;i<3;i++){
        cin >> pasta[i];
    }
    for(int i=0;i<2;i++){
        cin >> juuce[i];
    }
    
    for(int i=0;i<3;i++){
        for(int j=0;j<2;j++){
            sum=pasta[i]+juuce[j];
            if(sum<min){
                min=sum;
            }
        }
    }
    
    cout << min-50 << endl;
    
    return 0;
}

C++: /*
3ツづつづ稽inツづ?ツづつづ稽inツづーツ堕ォツつオツ債?づュツつケツづ? 50ツづーツ暗クツつ「ツづ?出ツ療債つオツづ慊つオツづ・ツつ、.
 */

#include <iostream>
#include <climits>
using namespace std;

int main(){
  int p = INT_MAX;

  for(int i = 0; i < 3; i++){
    int x;
    cin >> x;
    p = min(p, x);
  }

  int j = INT_MAX;

  for(int i = 0; i < 2; i++){
    int x;
    cin >> x;
    j = min(j, x);
  }

  cout << p + j - 50 << endl;
}

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

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<int> a,q;
    int b;
    for(int i=0;i<3;i++){
        cin >> b;
        a.push_back(b);
    }
    for(int i=0;i<2;i++){
        cin >> b;
        q.push_back(b);
    }
    sort(a.begin(),a.end());
    sort(q.begin(),q.end());
    int ans=0;
    ans+=a[0];
    ans+=q[0];
    cout << ans-50 << endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int minpa=2000,minju=2000,sum;
  int n;
  for(int i=0;i<3;i++){
    cin >> n;
    if(n<minpa)minpa=n;
  }
  for(int i=0;i<2;i++){
    cin >> n;
    if(n<minju)minju=n;
  }
  sum=(minpa+minju)-50;
  cout << sum << endl;
  return 0;
}

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

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

	cout<<mn1+mn2-50<<endl;
    return 0;
}

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

int main() {
	int pa, pb, pc, ja jb;
	int pm, jm;
	scanf("%d%d%d%d%d", &pa, &pb, &pc, &ja, &jb);
	pm = min(pa,pb,pc);
	jm = min(ja,jb);
	printf("%d\n", pm+jm-50);
	return 0;
}

C++: #include "bits/stdc++.h"
#define rep(i,a,n) for(int i = (a);i < (n);i++)
typedef unsigned long long ull;
typedef long long ll;
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;
    
    
    return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int main(void)
{
	int i,x,y,z,a;
	x=2001;
	y=2001;
	for(i=0;i<3;i++){
		cin>>a;
		if(x>a) x=a;
	}
	for(i=0;i<2;i++){
		cin>>a;
		if(y>a) y=a;
	}
	z=x+y-50;
	cout<<z<<endl;
	return 0;
}

C++: // 2012/02/22 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;
	}

	cout << p+j-50 << '\n';

	return 0;
}

C++: #include <cstdio>
int min(int a, int b) {
	return a<=b?a:b;
}
int main() {
	int a,b,c,d,e;
	scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
	printf("%d\n",min(a,min(b,c))+min(d,e)-50);
}

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

C++: #include <iostream>
using namespace std;
int main (void)
{
	int p[3],ju1,ju2;
	int sum;
	int tmp;
	for(int i=0;i<3;i++)
	{
		cin >> p[i];
		for(int j=0;j<i;j++)
		{
			if(p[j]>p[i])
			{
				tmp=p[j];
				p[j]=p[i];
				p[i]=tmp;
			}
		}
	}
	cin >> ju1 >> ju2;
	if(ju1>ju2) ju1=ju2;
	sum=p[0]+ju1-50;
	cout << sum << endl;
	return 0;
}

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

int main(){
  vector<int> p;
  vector<int> j;
  int tmp;
  while(cin >> tmp){
    p.push_back(tmp);
    for(int i=0; i<2; ++i){
      cin >> tmp;
      p.push_back(tmp);
    }

    for(int i=0; i<2; ++i){
      cin >> tmp;
      j.push_back(tmp);
    }
    sort(p.begin(),p.end());
    sort(j.begin(),j.end());
    int ans = p[0] + j[0]-50;
    cout << ans  << endl;
  }
}

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

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

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <array>
#include <vector>
#include <cmath>

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<iostream>
using namespace std;
int main(){
int x,y,z,w,q;
cin>>x>>y>>z>>w>>q;
if(y>=x&&z>=x){
if(w>=q){cout<<x+q-50<<endl;} 
else if(q>=w){cout<<x+w-50<<endl;}
}

else if(x>=y&&z>=y){
if(w>=q){cout<<y+q-50<<endl;} 
else if(q>=w){cout<<y+w-50<<endl;}
}

else if(x>=z&&y>=z){
if(w>=q){cout<<z+q-50<<endl;} 
else if(q>=w){cout<<z+w-50<<endl;}
}

return 0;
}

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

int n,a,b;
int main(){
	a=b=MAXC;
	for(int i=0;i<3;i++){
		cin >>n;
		if(n<a)a=n;
	}
	for(int i=0;i<2;i++){
		cin >>n;
		if(n<b)b=n;
	}
	cout << a+b-50<<endl;
	return 0;
}

C++: #include <iostream>
#include <functional>
#include <algorithm>
#include <climits>
#include <string>
#include <vector>
#include <map>
#include <cmath>

using namespace std;

namespace _{struct _{_(){ // initialize
  cin.tie(0); ios::sync_with_stdio(false);
}}_;}
template <typename T, size_t size>
inline size_t len(const T (&)[size]) { return size; }
#define println(s) cout << s << '\n';
#define str to_string
#define rep(i, n) for (int i=0; i<int(n); i++)
#define all(c) (c).begin(), (c).end()


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

  return 0;
}