#include <iostream>
using namespace std;
int main(void){
    int a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    int x,y;
    x=a;
    if(x>b) x=b;
    if(x>c) x=c;
    y=d;
    if(y>e) y=e;
    cout<<y+x-50;
    cout<<endl;
}

