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