import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException{
	BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));

	String s = buf.readLine();
    	String[] strlAry =s.split(" ");
    	for(int i=0;i<strlAry.length;i++){
   	    }
   	    System.out.println(strlAry.length);
 	}
}