output_description: Find the minimum number of operations required to make s equal to t. It can be
  proved that the objective is always achievable in a finite number of
  operations.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      s
      t
attempt: import numpy as np
  
  N = int(input())
  S = np.array(list(map(int, list(input()))), dtype=np.int)
  T = np.array(list(map(int, list(input()))), dtype=np.int)
  
  
  def lessthan3(s, t, N, k, f):
      if k >= N:
          return 0
      elif s[k] == t[k]:
          if f == 0:
              return lessthan3(s, t, N, k + 1, 0)
          elif f == 1:
              if k < N - 1:
                  return lessthan3(s, t, N, k + 1, 2)
              else:
                  s[k] ^= 1
                  return lessthan3(s, t, N, k, 1) + 1
          else:
              s[k] ^= 1
              return lessthan3(s, t, N, k, 2) + 1
      elif (
          (k >= 2 and s[k - 1] == t[k] and s[k - 2] == t[k])
          or (N - k >= 3 and s[k + 1] == t[k] and s[k + 2] == t[k])
          or (k >= 1 and N - k >= 2 and s[k - 1] == t[k] and s[k + 1] == t[k])
      ):
          return lessthan3(s, t, N, k + 1, 1) + 1
      #    elif f==0:
      else:
          s[k] = t[k]
          return lessthan3(s, t, N, k + 1, 0) + 1
  
  
  #    else:
  #        return lessthan3(s,t,N,k-f,0)
  
  print(lessthan3(S, T, N, 0, 0))
  
problem_description: Statement
  
  You are given strings s and t, both of length N. s and t consist of `0` and
  `1`. Additionally, in these strings, the same character never occurs three or
  more times in a row.
  
  You can modify s by repeatedly performing the following operation:
  
    * Choose an index i (1 \leq i \leq N) freely and invert the i-th character in s (that is, replace `0` with `1`, and `1` with `0`), under the condition that the same character would not occur three or more times in a row in s after the operation.
  
  Your objective is to make s equal to t. Find the minimum number of operations
  required.
samples: [{"input": "4\n    0011\n    0101", "output": "4\n    \n\nOne possible solution is `0011` \u2192 `1011` \u2192 `1001` \u2192 `1101` \u2192 `0101`.\n\n* * *"}, {"input": "1\n    0\n    0", "output": "0\n    \n\n* * *"}, {"input": "8\n    00110011\n    10101010", "output": "10"}]