import std.stdio, std.algorithm; void main() { readln; writeln(levenshteinDistance(readln, readln)); }