#include <stdio.h>

int main()
{
	int arr[4] = { 0 };
	int b = 0;
	int e = 0;
	while (b < 4)
	{
		scanf("%d", &arr[b]);
			b++;
	}

	for (int c = 1; c < 4; c++)
	{
		if (arr[0] < arr[c])
		{
			e = arr[0];
			arr[0] = arr[c];
			arr[c] = e;
		}

	}
	printf("%d\n", arr[0]);
	return 0;
}