const
m = 999;
var
i, N, count:integer;
begin
write('N = '); readln(N);
count := 0;
for i := 100 to m do
if (i mod 10) + (i div 10) mod 10 + (i div 100) mod 10 = N then
inc(count);
end;
writeln('Count = ', count);
readln;
end.
const
m = 999;
var
i, N, count:integer;
begin
write('N = '); readln(N);
count := 0;
for i := 100 to m do
begin
if (i mod 10) + (i div 10) mod 10 + (i div 100) mod 10 = N then
inc(count);
end;
writeln('Count = ', count);
readln;
end.