#include <iostream> #include <string> using namespace std; int camelcase(const string& s) { int wordCount = 1; // Start with 1 to account for the first word for (char ch : s) { if (isupper(ch)) { wordCount++; // Increment the count for every uppercase letter } } return wordCount; } int main() { string s; cin >> s; // Input the CamelCase string cout << camelcase(s) << endl; // Output the number of words return 0; }