#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1000000007;
const long long int INF = (long long int)1e15;
long long int dp[200005];
int main() {
  string S;
  cin >> S;
  memset(dp, 0, sizeof(dp));
  dp[0] = dp[1] = 1;
  for (long long int(i) = (1); (i) < (S.length()); ++(i)) {
    if (S[i] == S[i - 1])
      dp[i + 1] = dp[i - 1] + 1;
    else
      dp[i + 1] = dp[i] + 1;
  }
  cout << dp[S.length()] << endl;
  return 0;
}
