{$apptype console}
var
  x : integer;
  a, b, c, d : integer;
  ans : integer;

begin
  reset(input, 'sum.in');
  rewrite(output, 'sum.out');
  read(x);
  assert((1 <= x) and (x <= 1500));
  ans := 0;
  for a := 1 to x do begin
    for b := a to x - a do begin
      for c := b to x - a - b do begin
        d := x - a - b - c;
        if (d >= c) then begin
          inc(ans);
        end;
      end;
    end;
  end;
  writeln(ans);
end.