output_description: Print the maximum positive integer K that satisfies the condition.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: S = input()
  Slen = len(S)
  S_inv = S[::-1]
  
  
  prev_f = S[0]
  ptr_f = 1
  div_f = 0
  while ptr_f < Slen:
      # print(prev_f)
      if len(prev_f) != 1 or prev_f != S[ptr_f : ptr_f + 1]:
          prev_f = S[ptr_f]
          ptr_f += 1
      else:
          prev_f = S[ptr_f : ptr_f + 2]
          ptr_f += 2
      div_f += 1
  
  # print(div_f)
  
  
  prev_i = S_inv[0]
  ptr_i = 1
  div_i = 0
  while ptr_i < Slen:
      if len(prev_i) != 1 or prev_i != S[ptr_i : ptr_i + 1]:
          prev_i = S[ptr_i]
          ptr_i += 1
      else:
          prev_i = S[ptr_i : ptr_i + 2]
          ptr_i += 2
      div_i += 1
  
  div_max = max(div_f, div_i)
  print(div_max)
  
problem_description: Statement
  
  Given is a string S consisting of lowercase English letters. Find the maximum
  positive integer K that satisfies the following condition:
  
    * There exists a partition of S into K non-empty strings S=S_1S_2...S_K such that S_i \neq S_{i+1} (1 \leq i \leq K-1).
  
  Here S_1S_2...S_K represents the concatenation of S_1,S_2,...,S_K in this
  order.
samples: [{"input": "aabbaa", "output": "4\n    \n\nWe can, for example, divide S into four strings `aa`, `b`, `ba`, and `a`.\n\n* * *"}, {"input": "aaaccacabaababc", "output": "12"}]