import std.stdio, std.string, std.algorithm; int main() { readln; string s = readln.strip; string t = readln.strip; writeln(levenshteinDistance(s, t)); return 0; }