#include using namespace std; int main(){ int n,k = 0; cin >> n >> k; long long x[n]; long long a[n]; bool call[n]; int count = 0; stack flog; for(int i = 0; i < n; i++){ cin >> x[i]; call[i] = false; } for(int i = 0; i < n; i++){ cin >> a[i]; } call[k-1] = true; flog.push(k-1); long long id = 0; while(!flog.empty()){ id = flog.top(); flog.pop(); int j = 1; while(id + j <= n-1 && x[id]+a[id] >= x[id+j]){ if(call[id+j] == false)flog.push(id+j); call[id+j] = true; j++; } j = 1; while(id-j >= 0 && x[id]-a[id] <= x[id-j]){ if(call[id-j] == false)flog.push(id-j); call[id-j] = true; j++; } } for(int i = 0; i < n; i++){ if(call[i]){ count++; } } cout << count; }