var
a,b:integer;
s,t,ct:integer;
begin
ct:=0;
for a:=0 to 6 do
begin
for b:=0 to 6 do
begin
s:=4*a+4*b+12;
t:=trunc(sqrt(double(s)));
if s=t*t then
inc(ct);
end;
end;
writeln(ct);
end.
/**************************************************************
Problem: 1588
User: admin
Language: Pascal
Result: Wrong Answer
****************************************************************/