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 Would
#define you
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
long long fac[200005], finv[200005], inv[200005];
vector<long long>dij;
struct edge { long long to, cost; };
vector<vector<edge> >G;

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 A,B,C,D,E;
    cin>>A>>B>>C>>D>>E;
    cout<<(min({A,B,C})+min(D,E)-50)<<endl;
}a

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

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()
{
	for(int a,b,c,d,e;cin>>a>>b>>c>>d>>e;)
		cout<<min(a,min(b,c))+min(d,e)-50<<endl;
	return 0;
}

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

int main(void){
    int pasta[3], juice[2];
    for(int i=0; i < 3; i++)
        cin >> pasta[i];
    for(int i=0; i < 2; i++)
        cin >> juice[i];
    
    int min = 1000000;
    for(int i=0; i < 3; i++){
        for(int j=0; j < 2; j++){
            if(pasta[i] + juice[j] - 50 < min){
                min = pasta[i] + juice[j] - 50;
            }
        }
    }
    cout << min << endl;
    return 0;

}

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

int main()
{
  int p,j;
  p=j=2000;
  int t,i;
  for(i=0;i<3;i++){
    cin>>t;
    p=min(p,t);
  }
  for(i=0;i<2;i++){
    cin>>t;
    j=min(j,t);
  }
  cout<<p+j-50<<endl;
}

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

int main () {
	int a,b,c,d,e;
	int Ms1,Ms2,total;	
	cin >> a >> b >> c >> d >> e;
	if(a>c&&b>c){
		Ms1=c;
	}else{if(a>b&&c>b){
		Ms1=b;
	}else{
		Ms1=a;
	}
}
	if(d>e){
		Ms2=e;
	}else{
		Ms2=d;
	}

	total=(Ms1+Ms2)-50;
	cout << total << '\n';

	return 0;
}

C++: #include<bits/stdc++.h>

#define int long long int
#define rep(a,b,c) for(int a=b;a<c;a++)
#define repm(a,b,c) for(int a=(b-1);a>=c;a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d",&a)
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) (v).begin(), (v).end()

using namespace std;

const int INF = 1e18 + 9;
const int Mod = 1e9 + 7;
inline int replac(str s){double ans=0;rep(i,0,s.length()){ans+=(s[i]-'0')*pow(10,s.length()-i-1);}return (int)ans;}
inline string numstr(int m){str s="";while(m>0){char c;int a=m/10;if(a>0)a=m%(a*10);else a=m;c=(char)('0'+a);s+=c;m/=10;}str st="";for(int i=s.size()-1;i>=0;i--){st+=s[i];}return st;}
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef vector<pii> vii;

signed main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a[3],b[2];
    rep(i,0,3)cin >> a[i];
    rep(j,0,2)cin >> b[j];
    sort(a,a+3);
    sort(b,b+2);
    cout << a[0]+b[0]-50 << endl;
    return 0;
}

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

int main(){

  int a[3],b,c;

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

  sort(a, a+3);

  cout << a[0]+min(b,c)-50 << endl;

}

C++: #include <iostream>
#include <cstdio>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <cctype>
#include <complex>
#include <string>
#include <sstream>

using namespace std;

#define all(c) c.begin(),c.end()
#define rall(c) c.rbegin(),c.rend()
#define mp(a,b) make_pair((a),(b))
#define eq ==

typedef long long ll;
typedef complex<double> point;
typedef pair<int,int> pii;

// →↑←↓
const int dx[] = {1,0,-1,0};
const int dy[] = {0,-1,0,1};


const double EPS = 1e-9;

int main(){
    vector<int> pasta(3);
    vector<int> juice(2);
    for(int i=0;i<3;i++) cin >> pasta[i];
    for(int i=0;i<2;i++) cin >> juice[i];
    sort(all(pasta));
    sort(all(juice));
    cout << pasta.front() + juice.front() - 50 << endl;
    return 0;
}

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

int main(){
	int resa = 3000, resb = 3000;
	for(int i = 0; i < 3; i++){
		int a;
		cin >> a;
		resa = min(resa, a);
	}
	for(int i = 0; i < 2; i++){
		int a;
		cin >> a;
		resb = min(resb, a);
	}
	cout << resa + resb - 50 << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int pa,ju,most=100000,ans;
  for(int i=0;i<3;i++){
    cin >> pa;
    if(pa<ans){
      most=pa;
    }
  }
  ans=most;
  most=1000000;
  for(int i=0;i<2;i++){
    cin >> ju;
    if(ju<most){
      most=ju;
    }
  }
  ans+=most;
  ans-=50;
  cout << ans << endl;
  return (0);
}

C++: /*
JOI テ」ツδ妥」ツつケテ」ツつソテ・ツコツ療」ツ?ァテ」ツ?ッテッツシツ古」ツδゥテ」ツδウテ」ツδ?」ツ?ョテ」ツ?甘」ツ?凖」ツ?凖」ツつ?」ツδ妥」ツつケテ」ツつソテ」ツ?ィテヲツ青セテ」ツつ甘」ツ?淌」ツ?ヲテ」ツつクテ」ツδ・テ」ツδシテ」ツつケテ」ツ?ョテ」ツつサテ」ツδε」ツδ暗」ツδ。テ」ツδ凝」ツδ・テ」ツδシテ」ツ?古・ツ・ツスティツゥツ陛」ツ?ァテ」ツ?づ」ツつ凝ッツシツ偲」ツ?禿」ツ?ョテ」ツつサテ」ツδε」ツδ暗」ツδ。テ」ツδ凝」ツδ・テ」ツδシテ」ツつ津ヲツウツィテヲツ鳴?」ツ?凖」ツつ凝」ツ?ィテ」ツ?催」ツ?ッテッツシツ古」ツ?敕」ツ?ョテヲツ猟・テ」ツ?ョ 3 テァツィツョテゥツ。ツ榲」ツ?ョテ」ツδ妥」ツつケテ」ツつソテ」ツ?ィ 2 テァツィツョテゥツ。ツ榲」ツ?ョテ」ツつクテ」ツδ・テ」ツδシテ」ツつケテ」ツ?凝」ツつ?1 テ」ツ?、テ」ツ?堙」ツ?、テゥツ?クテ」ツ?カテッツシツ偲」ツδ妥」ツつケテ」ツつソテ」ツ?ィテ」ツつクテ」ツδ・テ」ツδシテ」ツつケテ」ツ?ョテ・ツ?、テヲツョツオテ」ツ?ョテ・ツ青暗ィツィツ暗」ツ?凝」ツつ?50 テ・ツ??」ツつ津・ツシツ陛」ツ??」ツ?淌ゥツ?妥ゥツ。ツ催」ツ?古、ツサツ」テゥツ?妥」ツ?ィテ」ツ?ェテ」ツつ凝ッツシツ?
テ」ツ?づ」ツつ凝ヲツ猟・テ」ツ?ョテ」ツδ妥」ツつケテ」ツつソテ」ツ?ィテ」ツつクテ」ツδ・テ」ツδシテ」ツつケテ」ツ?ョテ・ツ?、テヲツョツオテ」ツ?古、ツクツ偲」ツ?暗」ツつ嘉」ツつ古」ツ?淌」ツ?ィテ」ツ?催ッツシツ古」ツ?敕」ツ?ョテヲツ猟・テ」ツ?ョテ」ツつサテ」ツδε」ツδ暗」ツδ。テ」ツδ凝」ツδ・テ」ツδシテ」ツ?ョテ、ツサツ」テゥツ?妥」ツ?ョテヲツ慊?・ツーツ湘・ツ?、テ」ツつ津ヲツアツづ」ツつ?」ツつ凝」ツδ療」ツδュテ」ツつーテ」ツδゥテ」ツδ?」ツつ津、ツスツ愿ヲツ按静」ツ?崚」ツつ暗ッツシツ?
*/

#include <stdio.h>

int main(void){
	int pasta = 2000, juice = 2000, input;

	// テ」ツδ妥」ツつケテ」ツつソテ」ツ?ョテ・ツ?・テ・ツ環?
	for (int i = 0; i < 3; i++){
		scanf_s("%d", &input);
		if (input < pasta){
			pasta = input;
		}
	}

	// テ」ツつクテ」ツδ・テ」ツδシテ」ツつケテ」ツ?ョテ・ツ?・テ・ツ環?
	for (int i = 0; i < 2; i++){
		scanf_s("%d", &input);
		if (input < juice){
			juice = input;
		}
	}

	// テ・ツ?コテ・ツ環?
	printf("%d\n", pasta + juice - 50);

	return 0;
}

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

int main(int argc, char **argv)
{
	int a, b, c, d, e;
	std::cin >> a >> b >> c >> d >> e;
	std::cout << std::min(a, std::min(b, c)) + std::min(d, e) - 50 << std::endl;
	return 0;
}

C++: // JOI11-quest1.cpp : Defines the entry point for the console application.
//
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>


int main(void)
{
	int pasta = 2000, juice = 2000, temp;
	for (int i = 0; i < 3; i++) {
		scanf("%d", &temp);

		if (pasta > temp) {
			pasta = temp;
		}
	}

	for (int i = 0; i < 2; i++) {
		scanf("%d", &temp);

		if (juice > temp) {
			juice = temp;
		}
	}

	printf("%d\n", pasta + juice - 50);

	return 0;
}