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