function n = ccfi_order ( l )

%*****************************************************************************80
%
%% ccfi_order() computes the order of a CCFI rule from the level.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 May 2014
%
%  Author:
%
%    John Burkardt.
%
%  Input:
%
%    integer L, the level of the rule.
%
%  Output:
%
%    integer N, the order of the rule.
%
  if ( l < 1 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'CCFI_ORDER - Fatal error!\n' );
    fprintf ( 1, '  1 <= L required.\n' );
    fprintf ( 1, '  Input L = %d\n', l );
    error ( 'CCFI_ORDER - Fatal error!' );
  else
    n = 2^l - 1;
  end

  return
end
