program z5;
uses crt;
var i,a:integer; s:real;
BEGIN
clrscr;
s:=0;
for i:=20 to 100 do
if (i mod 3=0) then
if (i-int(i/10)*10=2) or (i-int(i/10)*10=4) or (i-int(i/10)*10=8) then
s:=s+i;
writeln('s', s:8:1);
readln;
END.