#include <iostream>
#include <vector>
#include <unordered_set>
#include <algorithm>
using namespace std;

int main() {
	vector<int> a {2, 3, 5, 7, 11, 13};
	vector<int> b {1, 3, 5, 7, 9, 11};
	unordered_set<int> s(a.begin(), a.end());
	int res = count_if(b.begin(), b.end(), [&](int k) {return s.find(k) != s.end();});
	cout << res << endl;
	return 0;
}