#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string x;
    cin >> x;
    int niz[x.size()];
    for(int i=0;i<x.size();++i){
        niz[i] = x[i] - '0';
    }

    multimap<int,int> mapa;
    for(int i=0;i<x.size();++i){
        int x = niz[i];
        int brp = 1;
        while(niz[i+1]==x){
            brp++;
            i++;
        }
        mapa.insert(make_pair(x,brp));

    }

    int br=1;
    printf("%d",br);
    return 0;
}