#include <iostream>
using namespace std;
int main() {
int s, t, res = 0;
cin >> s;
for (int i = 0; i < s; i++) {
cin >> t;
if (t % 10 == 3) res += t;
}
cout << res << endl;
return 0;
}
Const n=10;
var a:array[1..n,1..n] of integer;
b:array[1..n] of integer;
s,i,j:integer;
begin
for i:=1 to n do
for j:=1 to n do begin
read(a[i,j]);
if i=j then b[i]:=a[i,j];
end;
for i:=1 to n do
write(b[i],' ');
<span>end.</span>
Var n:real;a:integer;beginreadln(a);n:=a;if (a mod 2=0) and (a>0) then n:=a/4;if (a mod 2=0) and (a<0) then n:=a*5;if (a mod 2=1) then n:=a*a;writeln(n);end.
Const n=5;
const m=4;
var i,j,Sch: integer;
a:array[1..n,1..m] of integer;
Begin
Sch:=0;
For i:=1 to 5 do begin
For j:=1 to 4 do begin
a[i,j]:=random(73)-23;
write(a[i,j], ' ');
If a[i,j]>0 then Sch:=Sch+1;
end;
end;
writeln;
writeln('kollichestvo= ', Sch);
<span>end.</span>