program prob2
    implicit none
    integer::i, l, cnt, k, j
    character(len=200005)::S, a, b
    read(*,*) S
    l = len_trim(S)

    a = S(1:1)
    cnt = 1
    i = 2
    do while(i <= l)
        k = len_trim(a)
        do j = 1, k
            if(S(i:i+j-1) .ne. a(1:j))then
                a = S(i:i+j-1)
                cnt = cnt + 1
                i = i+j-1
                exit
            else if(j == k)then
                a = S(i:i+k)
                cnt = cnt + 1
                i = i+j+1
            end if
        end do
    end do

    write(*,*) cnt
    stop
end program prob2