def hoge():
	result = 0
	try:
		while True:
			line = map(int, raw_input().split())
			result += max(line)
	except EOFError:
		return result
			
if __name__=='__main__':
	print hoge()