#include <iostream>
using namespace std;

#define maxSize 60

int main()
{
	int score[maxSize];
	int n, k, res;
	cin>>n>>k;
	res=0;
	for(int i=0; i<n; ++i)
		cin>>score[i];
	for(int i=0; i<n; ++i)
		if((score[i]>=score[k-1]) && (score[i]>0))
			++res;
	cout<<res<<endl;
	return 0;
}

  

 posted on 2019-11-06 10:11  ComMario  阅读(86)  评论(0编辑  收藏  举报