solution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import java.util.Scanner;
import java.util.StringTokenizer;
public class BOJ1152 {
public static void main(String[] args) {
// boj1152
String sentence = new Scanner(System.in).nextLine().trim();
StringTokenizer st = new StringTokenizer(sentence, " ");
System.out.println(st.countTokens());
}
}