#include using namespace std; int main() { int N, C = 0; cin >> N; vector A(N); for (int &B : A) cin >> B; for (int i = 0; i < N; i++) { int B; cin >> B; if (B >= A.at(i)) C++; } cout << C << endl; }