import re
s = input()
pattern = r'(\d*-?\d*)+'
print(re.match(pattern, s).group(0))