uses crt;
var a:array[1..100]of integer;
n,i,x,t,dem:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
readln(x);
dem:=0;
t:=0;
for i:=1 to n do
if a[i]>x then
begin
write(a[i]:4);
t:=t+a[i];
dem:=dem+1;
end;
writeln;
writeln(t);
writeln(dem);
readln;
end.