#include using namespace std; using ll = long long; int main(void){ int n; cin >> n; vector a(n), b(n); for (auto &x: a) cin >> x; for (auto &x: b) cin >> x; int ans = 0; for (int i = 0; i < n; i++) { if (a[i] <= b[i]) ans++; } cout << ans << endl; return 0; }