using System;
public class Program
{
public static void Main()
string[] slowa = Console.ReadLine().Split(' ');
Console.WriteLine(slowa.Length);
}