program bai_tap;
var t,k:integer;
begin
assign(input,'DULIEU.TXT');
reset(input);
assign(output,'KETQUA.TXT');
rewrite(output);
t:=0;
while not eof(input) do
begin
read(k);
t:=t+sqr(k);
end;
write(t);
close(output);
end.