#include using namespace std; template istream& operator >> (istream& is, vector& vec) { for(T& x : vec) is >> x; return is; } int main(){ ios::sync_with_stdio(false); cin.tie(0); int n, ans = 0; cin >> n; vector a(n), b(n); cin >> a >> b; for(int i = 0; i < n; i++) ans += a[i] <= b[i]; cout << ans << '\n'; }