var a:array[1..10000] of integer;
n,i,mult,summa:integer;
begin
read(n);
summa = 0;
mult = 0;
k = 0;
for i:=1 to n do
read(a[i]);
summa = summa + a[i];
mult = mult * a[i];
if (a[i] mod 3 = 0) and (a[i] mod 5 <>0) then
inc(k)
end;
writeln('a' - summa,'b' - mult,'a' - k
end.
var a:array[1..10000] of integer;
n,i,mult,summa:integer;
begin
read(n);
summa = 0;
mult = 0;
k = 0;
for i:=1 to n do
begin
read(a[i]);
summa = summa + a[i];
mult = mult * a[i];
if (a[i] mod 3 = 0) and (a[i] mod 5 <>0) then
inc(k)
end;
writeln('a' - summa,'b' - mult,'a' - k
end.