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()
ZGVmIGhvZ2UoKToKCXJlc3VsdCA9IDAKCXRyeToKCQl3aGlsZSBUcnVlOgoJCQlsaW5lID0gbWFwKGludCwgcmF3X2lucHV0KCkuc3BsaXQoKSkKCQkJcmVzdWx0ICs9IG1heChsaW5lKQoJZXhjZXB0IEVPRkVycm9yOgoJCXJldHVybiByZXN1bHQKCQkJCmlmIF9fbmFtZV9fPT0nX19tYWluX18nOgoJcHJpbnQgaG9nZSgp