Program HOC24;
const fi='VAO.TXY';
fo='KQ.TXY';
var d,i,n,k: integer;
a: array[1..32000] of integer;
procedure ip;
begin
assign(f,fi);
reset(f);
readln(f,n,k);
for i:=1 to n do read(f,a[i]);
d:=0;
for i:=1 to n do if a[i]=k then d:=d+1;
close(f);
end;
procedure out;
begin
assign(f,fo);
rewrite(f);
write(f,d);
close(f);
end;
begin
ip;
out;
end.