import strutils proc p:auto=stdin.readline let _=p() echo p().editDistance p()