/******************************************************************************
Online Java Compiler.
Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.
*******************************************************************************/
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int count = 0;
String a = scan.nextLine();
if(a.isEmpty()){
System.out.println("no String");
}
else{
count = a.split(" ").length;
System.out.println(count);
}
}
}