


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCAmelCase__        =				{
    '''configuration_musicgen''': [
        '''MUSICGEN_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''MusicgenConfig''',
        '''MusicgenDecoderConfig''',
    ],
    '''processing_musicgen''': ['''MusicgenProcessor'''],
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase__        =				[
      '''MUSICGEN_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''MusicgenForConditionalGeneration''',
      '''MusicgenForCausalLM''',
      '''MusicgenModel''',
      '''MusicgenPreTrainedModel''',
  ]

if TYPE_CHECKING:
  from .configuration_musicgen import (
      MUSICGEN_PRETRAINED_CONFIG_ARCHIVE_MAP,
      MusicgenConfig,
      MusicgenDecoderConfig,
  )
  from .processing_musicgen import MusicgenProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_musicgen import (
        MUSICGEN_PRETRAINED_MODEL_ARCHIVE_LIST,
        MusicgenForCausalLM,
        MusicgenForConditionalGeneration,
        MusicgenModel,
        MusicgenPreTrainedModel,
    )

else:
  import sys

  UpperCAmelCase__        =				_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





import math
def 							UpperCAmelCase_   (				__snake_case		)	->     int:







 """simple docstring"""


 return sum(int(__snake_case		) for digit in str(__snake_case		)		)
def 							UpperCAmelCase_   (				__snake_case = 30		)	->     int:







 """simple docstring"""


 _lowercase				 =[]
 for digit in range(2	,		100		):
  for power in range(2	,		100		):
   _lowercase				 =int(math.pow(__snake_case	,		__snake_case		)		)
   if digit == digit_sum(__snake_case		):
    digit_to_powers.append(__snake_case		)

 digit_to_powers.sort()
 return digit_to_powers[n - 1]


if __name__ == "__main__":
  print(solution())

