output_description: Print the length of the shortest string that satisfies the conditions.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      N
      s
      t
attempt: n, s, t = eval("input()," * 3)
  print(2 * int(n) - max(i * (s[-i:] == t[:i]) for i in range(99)))
  
problem_description: Statement
  
  Snuke is interested in strings that satisfy the following conditions:
  
    * The length of the string is at least N.
    * The first N characters equal to the string s.
    * The last N characters equal to the string t.
  
  Find the length of the shortest string that satisfies the conditions.
samples: [{"input": "3\n    abc\n    cde", "output": "5\n    \n\nThe shortest string is `abcde`.\n\n* * *"}, {"input": "1\n    a\n    z", "output": "2\n    \n\nThe shortest string is `az`.\n\n* * *"}, {"input": "4\n    expr\n    expr", "output": "4\n    \n\nThe shortest string is `expr`."}]