using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main()
{
String input = @"word1 word2 word3 word4 word5";
Regex rgx = new Regex(@"\S+\s+\S+");
int NumberOfTrues = rgx.Matches(input).Count;
Console.WriteLine(NumberOfTrues);
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CiAKcHVibGljIGNsYXNzIFRlc3QKewpwdWJsaWMgc3RhdGljIHZvaWQgTWFpbigpCnsKIAogClN0cmluZyBpbnB1dCA9IEAid29yZDEgd29yZDIgd29yZDMgd29yZDQgd29yZDUiOwpSZWdleCByZ3ggPSBuZXcgUmVnZXgoQCJcUytccytcUysiKTsKaW50IE51bWJlck9mVHJ1ZXMgPSByZ3guTWF0Y2hlcyhpbnB1dCkuQ291bnQ7CkNvbnNvbGUuV3JpdGVMaW5lKE51bWJlck9mVHJ1ZXMpOwp9Cn0=