import std.algorithm, std.conv, std.range, std.stdio, std.string; void main() { auto n = readln.chomp.to!size_t; auto s = readln.chomp; // abcdefghijklmnopqrstuvwxyz // 01234567890123456789012345 auto ca = 0, ci = 8, ck = 10, cu = 20, cy = 24, cz = 25; auto hi = new int[](26); foreach (c; s) ++hi[c - 'a']; auto r = 0; auto rz = hi[cz]; hi[cz] -= rz; r += rz; auto ry = hi[cy]; hi[cy] -= ry; foreach (c; cu+1..cz+1) { auto ry_ = min(ry, hi[c]); hi[c] -= ry_; ry -= ry_; r += ry_; } auto ryu = min(ry, hi[cu]); hi[cu] -= ryu; foreach (c; ck+1..cz+1) { auto ryu_ = min(ryu, hi[c]); hi[c] -= ryu_; ryu -= ryu_; r += ryu_; } auto ryuk = min(ryu, hi[ck]); hi[ck] -= ryuk; foreach (c; ci+1..cz+1) { auto ryuk_ = min(ryuk, hi[c]); hi[c] -= ryuk_; ryuk -= ryuk_; r += ryuk_; } auto ryuki = min(ryuk, hi[ci]); hi[ci] -= ryuki; foreach (c; ca..cz+1) { auto ryuki_ = min(ryuki, hi[c]); hi[c] -= ryuki_; ryuki -= ryuki_; r += ryuki_; } r += (ry + ryu + ryuk + ryuki) / 2; writeln(r); }