#include <bits/stdc++.h>
using namespace std;
long long int INF = 1LL << 60;
string S;
int main() {
  cin >> S;
  long long int cnt = 0;
  string cur = S.substr(0, 1);
  string tar = "";
  for (int i = 0; i < S.size(); i++) {
    for (int j = 1; i + j < S.size(); j++) {
      if (i + j < S.size()) {
        tar = S.substr(i + 1, j);
      } else {
        cnt++;
        cur = tar;
        tar = "";
        i += j;
        break;
      }
      if (cur != tar) {
        cnt += 2;
        cur = tar;
        tar = "";
        i += j;
        break;
      }
    }
  }
  cout << cnt << endl;
}
