#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int a,b,c,d,sum=0;
	char s[100];

    cin>>a>>b>>c>>d;

    cout<<min(a,b)+min(c,d)<<endl;
	
	return 0;
}
	#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int a,b,c,d,sum=0;
	char s[100];

	cin>>a>>b>>c;

	if(a+b>=c)
		cout<<"Yes";
	else
	{
		cout<<"No";
	}
	
	
	
	return 0;
}
	