using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Contest
{
    class Program
    {
        static void Main(string[] args)
        {
            StringBuilder s = new StringBuilder(Console.ReadLine());
            List<string> ls = new List<string>();
            ls.Add("");
            while (s.Length != 0)
            {
                int i = 1;
                while (true)
                {
                    string str = s.ToString(0, i);
                    if (ls.Last() != str)
                    {
                        ls.Add(str);
                        s=s.Remove(0, i);
                        break;
                    }
                    i++;
                }
            }
            Console.WriteLine(ls.Count()-1);
        }


    }
}
