#include #include #include #include using namespace std; int main() { int n; cin >> n; hash str_hash; list> judges; for (int i = 0; i < n; ++i) { string s; cin >> s; judges.push_back(make_pair(str_hash(s), s)); } int res = 0; for (int i = 0; i < n; ++i) { string s; cin >> s; size_t h = str_hash(s); for (auto it = judges.begin(); it != judges.end(); ++it) { if (it->first == h && it->second == s) { ++res; judges.erase(it); break; } } } cout << res << endl; return 0; }