string = input()
count = 1 
for i in range(len(string)):
     if string[i] == " ":
         count += 1
print(count)
         

e278d498fc71345d175e3d5f25efe151f2a88f72
<mask token>

<mask token>
for i in range(len(string)):
    if string[i] == ' ':
        count += 1
print(count)

string = input()
count = 1
for i in range(len(string)):
    if string[i] == ' ':
        count += 1
print(count)

string = input()
count = 1 
for i in range(len(string)):
     if string[i] == " ":
         count += 1
print(count)
         
