<<<<<<< HEAD
import math
def f(a,b,c,d):
	return min(min(a,b), min(c,d))
a,b,c,d = input().split()
=======
import math
def f(a,b,c,d):
	return min(min(a,b), min(c,d))
a,b,c,d = input().split()
>>>>>>> ec863b8dfbbeba8f5506e1f29976ea8308fddd9e
print(f(a,b,c,d))
ae45e66bd163bf509339f712a65859e6e07ae01a
<<<<<<< HEAD
import math
def f(a,b,c,d):
	return min(min(a,b), min(c,d))
a,b,c,d = input().split()
=======
import math
def f(a,b,c,d):
	return min(min(a,b), min(c,d))
a,b,c,d = input().split()
>>>>>>> ec863b8dfbbeba8f5506e1f29976ea8308fddd9e
print(f(a,b,c,d))