#include<bits/stdc++.h> using namespace std; long long n,m,l,h,a[99999]; int main(){ cin>>n>>m; for(int i=1;i<=n;i++)cin>>a[i]; for(int i=1;i<=m;i++){ cin>>l; if(l<=n&&a[l]<200)h++; } cout<<h<<endl; return 0; }