python

self = input()
if self.rfind(' ') == -1:
print(len(self))
else:
i = self.rfind(' ')
print(len(self[i+1:]))