#include <iostream>
#include <string>

int main() {
    std::string s;
    std::getline(std::cin, s);
    unsigned count = 1;
    for (char c : s) {
        if (c == ' ') {
            count++;
        }
    }
    std::cout << count << '\n';
}