Program Tema;
uses Sysutils;
const
F_NAME_IN='BUGET.TXT';
F_NAME_OUT='OUT.TXT';
Var tfIn,tfOut:TextFile;
x,y,s:integer;
begin
AssignFile(tfIn,F_NAME_IN);
AssignFile(tfOut,F_NAME_OUT);
s:=0;
while not eof(tfIn) do
begin
readln(x,y);
if(x=1) then
s:=s+y;
end;
writeln(tfOut,'Produse alimentare ',s);
tfIn.close();
tfOut.close();
end.