#include<bits/stdc++.h>
using namespace std;
inline long long read(){
	long long x=0,f=1;char ch=getchar();
	while ((!isdigit(ch))&&(ch!='-')) ch=getchar();
	if (ch=='-') f=-1,ch=getchar();
	while (isdigit(ch)) x=(x<<1)+(x<<3)+ch-'0',ch=getchar();
	return x*f;
}
long long n,m,i,x,sum,a[1001010];
int main(){
	freopen("meow2.in","r",stdin);
	n=read();n=read();m=read();
	for (i=1;i<=n;i++) a[i]=read();
	for (i=87;i<=n;i++)
	    if (a[i]==1) {
	    	sum++;
		}
	printf("%lld\n",sum);
	puts("");
	return 0;
}
