from std/editdistance import editDistanceAscii let _ = stdin.readLine let S = stdin.readLine let T = stdin.readLine echo(editDistanceAscii(S,T))