#include <iostream>

using namespace std;

int main()
{ int a,b,c,d,e,x,y;
cin>>a>>b>>c>>d>>e;
if(a<=b&&a<=c){x=a;}
if(b<=a&&b<=c){x=b;}
if(c<=a&&c<=b){x=c;}
if(d<=e){y=d;}
if(e<d){y=e;}
cout<<x+y-50<<"\n";
 return 0;
}