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<string>
using namespace std;

int main(){
	/*
	int a,b,c,d,e;

	cin >> a >> b >> c >> d >> e;

	int x;

	if(a > 0){
		x = e*(b-a);
	}
	if(a == 0){
		x = e*b + d;
	}
	if(a < 0){
		x = -c*a + e*b + d;
	}

	cout << x <<endl;
	*/

	/*
	int a,b,c,d,e,f;
	cin >> a >> b >> c >> d >> e >> f;
	int m,n;
	int x = a + b + c + d + e + f;


	
	if(e<f)
	{
		x = x - e;
		if(a<b)
		{
			if(a<c)
			{
				if(a<d)
				{
					cout << x-a << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
			else
			{
					if(c<d)
				{
					cout << x-c << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
		}
		else
		{
			if(b<c)
			{
				if(b<d)
				{
					cout << x-b << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
			else
			{
					if(c<d)
				{
					cout << x-c << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
		}
	}
	else
	{
		x = x - f;
		if(a<b)
		{
			if(a<c)
			{
				if(a<d)
				{
					cout << x-a << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
			else
			{
					if(c<d)
				{
					cout << x-c << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
		}
		else
		{
			if(b<c)
			{
				if(b<d)
				{
					cout << x-b << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
			else
			{
					if(c<d)
				{
					cout << x-c << endl;
				}
				else
				{
					cout << x-d << endl;
				}
			}
		}
	}
	*/
/*
	int n;
	cin >> n;
	int a;
	cin >> a;
	int max = a,min = a;
	int i = 1;
	while(i<n){
		cin >> a;
		if(a > max){
			max = a;
		}
		if(a < min){
			min = a;
		}
		i++;
	}
	cout << max << endl << min << endl;
	*/
	/*
	string s;
	cin >> s;
	int j,o,i;
	for(int i;i < s.size;i++){
		
	}
	*/
	/*
	int n;
	cin >> n;
	int A;
	int X[100000];
	int n=0;
	for(int i=0;i<n;i++){
		cin >> A;
		
	}
	*/
	/*
	int a,b,c,d,p;
	cin >> a >> b >> c >> d >> p;
	int X,Y=b;

	X = a*p;
	
	if(p>c){
		Y += d*(p-c);
	}

	if(X > Y){
		cout << Y << endl;
	}
	else{
		cout << X << endl;
	}
	*/ 
	/*
	int l,a,b,c,d;
	cin >> l >> a >> b >> c >> d;

		int Jap = a/c;
		if(a%c != 0){
			Jap += 1;
		}
		int Math = b/d;
		if(b%d != 0){
			Math += 1;
		}

	int day = Jap;
	if(Jap < Math) {
		day = Math;
	}

	cout << l - day << endl;
	*/

	int pa,pb,pc,ja,jb;
	cin >> pa >> pb >> pc >> ja >> jb;
	
	if(pa > pb){
		pa = pb;
	}
	if(pa > pc){
		pa = pc;
	}

	if(ja > jb){
		ja = jb;
	}

	cout << pa + ja -50 << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define INF (1<<29)
using namespace std;
typedef long long ll;
int main(){
      int a[3],b[2];
      REP(i,3)cin>>a[i];
      REP(i,2)cin>>b[i];
      sort(a,a+3);
      sort(b,b+2);
      cout<<a[0]+b[0]-50<<endl;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
    int p1,p,dr1,dr;
    for(int i=0;i<2;i++){
        if(i==0)cin>>p1;
        cin>>p;
        if(p1>p)p1=p;
    }
    cin>>dr1>>dr;
    if(dr1>dr)dr1=dr;
    cout<<p1+dr1-50<<"\n";
}

C++: #include<stdio.h>

int main() {
	int costP[3], costJ[2];
	int min = 2001, sum = 0;

	for (int i = 0; i < 3; i++) {
		scanf("%d", &costP[i]);
	}
	for (int i = 0; i < 2; i++) {
		scanf("%d", &costJ[i]);
	}
	for (int i = 0; i < 3; i++) {
		if (min > costP[i]) min = costP[i];
	}
	sum += min;
	min = 2001;
	for (int i = 0; i < 2; i++) {
		if (min > costJ[i]) min = costJ[i];
	}
	sum += min;
	printf("%d\n", sum - 50);
	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;
}

C++: #include <stdio.h>
int main(){
	int p[3],j[2],min=3000,f;
	for(int i=0;i<3;i++) scanf("%d",&p[i]);
	for(int i=0;i<2;i++) scanf("%d",&j[i]);
	for(int i=0;i<3;i++) for(int k=0;k<2;k++) if(min>p[i]+j[k]-50) min= p[i]+j[k]-50;
	printf("%d\n",min);
	return 0;
}

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

int main()
{
	int price[5];

	for (int i = 0; i < 5; i++){
		cin >> price[i];
	}
	
	cout << min(price[0], min(price[1], price[2])) + min(price[3], price[4]) - 50 << endl;

	return (0);
}

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


int main(){
  int a,b,c,d,e;
  cin>>a>>b>>c>>d>>e;

  if( a < b && a < c && d < e) cout<<a+d-50<<endl;
  if( a < b && a < c && d > e) cout<<a+e-50<<endl;
  if( a > b && b < c && d < e) cout<<b+d-50<<endl;
  if( a > b && b < c && d > e) cout<<b+e-50<<endl;
  if( c < b && a > c && d < e) cout<<c+d-50<<endl;
  if( c < b && a > c && d > e) cout<<c+e-50<<endl;

 return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int pas[3];
	int ju[2];
	for (int i = 0; i < 3; i++){
		int x;
		while (1){
			cin >> x;
			if (x <= 2000 && x >= 100){
				break;
			}else{
				continue;
			}
		}
		pas[i] = x;
	}
	for (int j = 0; j < 2; j++){
		int x;
		while (1){
			cin >> x;
			if (x <= 2000 && x >= 100){
				break;
			}
			else{
				continue;
			}
		}
		ju[j] = x;
	}
	sort(pas, pas + 3);
	sort(ju, ju + 2);
	cout << pas[0] + ju[0] - 50 << endl;
	return 0;
}

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

using namespace std;

int main(int argc, char *argv[]) {
  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];
  sort(pasta, pasta + 3);
  sort(juice, juice + 2);
  cout << pasta[0] + juice[0] - 50 << endl;
  return 0;
}

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

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

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

using namespace std;

int main(){

	int pasta[3] , juice[2];
	int sum = 0;

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

	sort(pasta , pasta + 3 , less<int>());
	sort(juice , juice + 2 , less<int>());

	sum = (pasta[0] + juice[0]) - 50;

	cout << sum << endl;

	return 0;
}

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

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a[3],b[2];
	cin>>a[0]>>a[1]>>a[2]>>b[0]>>b[1];
	sort(a,a+3);
	sort(b,b+2);
	cout<<a[0]+b[0]-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(min(a,b),c)+min(d,e)-50<<endl;
	return 0;
}

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

int main(){
  int price[3];
  int price_j[2];

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

  int min,min_j;
  min = min_j = 3000;
  for(int i = 0; i < 3; i++){
    if(min > price[i] ){
      min = price[i];
    }
  }
  for(int i = 0; i < 2; i++){
    if(min > price_j[i]){
      min = price_j[i];
    }
  }

  cout << min + min_j - 50 << endl;
  return 0;
}