import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random, core.bitop; import std.string, std.regex, std.conv, std.stdio, std.typecons; void main() { auto rd = readln.split.map!(to!size_t); auto n = rd[0], m = rd[1]; auto s = readln.chomp; auto t = readln.chomp; writeln(levenshteinDistance(s, t)); }