using System;
public class Program
{
public static void Main()
int num = 0;
Console.Write("Input a message: ");
string str = Console.ReadLine();
Console.WriteLine();
for (int i = 0 ;i < str.Length-1 ; i++ )
if( str[i] == ' ')
num++;
}
// Console.WriteLine("This message have {0} words ",num);
Console.WriteLine("This message have {0} words ",num+1);