function s = football_dynamic ( n )

%*****************************************************************************80
%
%% football_dynamic() counts the ways of getting any football score from 0 to 100.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    21 September 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer n: the highest score to be considered.
%
%  Output:
%
%    integer s(1:n+1): s(n+1) is the number of ways of achieving a score of n.
%
  s = zeros ( n + 1, 1 );

  for im1 = 0 : n

    i = im1 + 1;

    s(i) = 0;

    if ( im1 == 0 )
      s(i) = 1;
    end
    if ( 1 <= im1 )
      s(i) = s(i) + s(i-1);
    end
    if ( 2 <= im1 )
      s(i) = s(i) + s(i-2);
    end
    if ( 3 <= im1 )
      s(i) = s(i) + s(i-3);
    end
    if ( 6 <= im1 )
      s(i) = s(i) + s(i-6);
    end
    if ( 7 <= im1 )
      s(i) = s(i) + s(i-7);
    end
    if ( 8 <= im1 )
      s(i) = s(i) + s(i-8);
    end

  end

  return
end

