#include<algorithm>
#include<iostream>

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

	std::cout << std::min( a, std::min( b, c ) ) + std::min( d, e ) - 50 << std::endl;

	return 0;
}