program figuros_is_virveliu;
{ 145 u‘davinys }

  procedure figuros (n: integer; var trik, kvadr, stac: integer);
    var a, b, c: integer;
  begin
    { rasime kvadrat— skai‡i— }
    if n mod 4 = 0
       then kvadr := 1
       else kvadr := 0;
    { rasime sta‡iakampi— skai‡i— }
    if (n mod 2 = 0) and (n > 2)
       then stac := n div 4 - kvadr
       else stac := 0;
    { rasime trikampi— skai‡i— }
    trik := 0;
    for a := 1 to n do
      for b := a to n-a do
        begin
          c := n - (a + b);
          if (c >= a) and (c >= b) { vienodi trikampiai nesikartoja } and
             (a+b > c) and (a+c > b) and (b+c > a)
             then trik := trik + 1
        end;
  end; { fig–ros }

  var n, trik, kvadr, stac: integer;
begin
  readln (n);
  figuros (n, trik, kvadr, stac);
  writeln ('Trikampi— skai‡ius: ', trik);
  writeln ('Kvadrat— skai‡ius: ', kvadr);
  writeln ('Sta‡iakampi— skai‡ius: ', stac);
end.
