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

}