Program hotrotinhoc;
var i,n,x,d: integer;
t,t1: longint;
a: array[1..500] of integer;
begin
write('N='); readln(n);
write('X='); readln(x);
t:=0; t1:=0; d:=0;
for i:=1 to n do
begin
write('a[',i,']=');
readln(a[i]);
if a[i]>0 then t:=t+a[i];
if (a[i]>0) and (a[i] mod 5=0) then t1:=t1+a[i];
if a[i]=x then inc(d);
end;
writeln('Tong cac so duong trong day A la :',t);
writeln('Tong cac so duong va chia het cho 5 trong day A la :',t1);
write('So lan xuat hien so nguyen X trong day A la :',d);
readln
end.