output_description: Print the minimum number of tiles that need to be repainted to satisfy the
  condition.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: import sys
  
  
  def judge(string):
      mem = ""
      for char in string:
          if mem == char:
              return False
          mem = char
  
      return True
  
  
  def main():
      sinputl = sys.stdin.readline
  
      input = sinputl().strip()
      length = len(input)
      input = int(input, base=2)
  
      paint = [length]
  
      for i in range(2**length):
          status = input ^ i
          print(bin(status)[2:].zfill(length))
          if judge(bin(status)[2:].zfill(length)):
              paint.append(bin(i).count("1"))
  
      print(min(paint))
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  N tiles are arranged in a row from left to right. The initial color of each
  tile is represented by a string S of length N.
  
  The i-th tile from the left is painted black if the i-th character of S is
  `0`, and painted white if that character is `1`.
  
  You want to repaint some of the tiles black or white, so that any two adjacent
  tiles have different colors.
  
  At least how many tiles need to be repainted to satisfy the condition?
samples: [{"input": "000", "output": "1\n    \n\nThe condition can be satisfied by repainting the middle tile white.\n\n* * *"}, {"input": "10010010", "output": "3\n    \n\n* * *"}, {"input": "0", "output": "0"}]