


import unittest

from transformers import (
    MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING,
    TF_MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING,
    PreTrainedTokenizer,
    is_vision_available,
)
from transformers.pipelines import ImageClassificationPipeline, pipeline
from transformers.testing_utils import (
    is_pipeline_test,
    nested_simplify,
    require_tf,
    require_torch,
    require_torch_or_tf,
    require_vision,
    slow,
)

from .test_pipelines_common import ANY


if is_vision_available():
       from PIL import Image
else:


       class        A_					:




             '''simple docstring'''


             @staticmethod
             def      _snake_case	(				*a:       int						,      **a:       str				):
              pass


@is_pipeline_test
@require_torch_or_tf
@require_vision
class        A_					(       unittest.TestCase    ):




      '''simple docstring'''


      __snake_case					       =   MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING
      __snake_case					       =   TF_MODEL_FOR_IMAGE_CLASSIFICATION_MAPPING




      def      _snake_case	(				self:       Tuple						,      a:       Tuple						,      a:       int						,      a:       Tuple				):
       __lowerCamelCase		:							Tuple							=						ImageClassificationPipeline(model=a						,      image_processor=a						,      top_k=2				)
       __lowerCamelCase		:							Any							=						[
           Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'				),
           'http://images.cocodataset.org/val2017/000000039769.jpg',
       ]
       return image_classifier, examples




      def      _snake_case	(				self:       Dict						,      a:       str						,      a:       List[str]				):
       __lowerCamelCase		:							int							=						image_classifier('./tests/fixtures/tests_samples/COCO/000000039769.png'				)

       self.assertEqual(
           a						,      [
               {'score': ANY(a				), 'label': ANY(a				)},
               {'score': ANY(a				), 'label': ANY(a				)},
           ]						,      )

       import datasets

       __lowerCamelCase		:							Optional[Any]							=						datasets.load_dataset('hf-internal-testing/fixtures_image_utils'						,      'image'						,      split='test'				)

       # Accepts URL + PIL.Image + lists
       __lowerCamelCase		:							Tuple							=						image_classifier(
           [
               Image.open('./tests/fixtures/tests_samples/COCO/000000039769.png'				),
               'http://images.cocodataset.org/val2017/000000039769.jpg',
               # RGBA
               dataset[0]['file'],
               # LA
               dataset[1]['file'],
               # L
               dataset[2]['file'],
           ]				)
       self.assertEqual(
           a						,      [
               [
                   {'score': ANY(a				), 'label': ANY(a				)},
                   {'score': ANY(a				), 'label': ANY(a				)},
               ],
               [
                   {'score': ANY(a				), 'label': ANY(a				)},
                   {'score': ANY(a				), 'label': ANY(a				)},
               ],
               [
                   {'score': ANY(a				), 'label': ANY(a				)},
                   {'score': ANY(a				), 'label': ANY(a				)},
               ],
               [
                   {'score': ANY(a				), 'label': ANY(a				)},
                   {'score': ANY(a				), 'label': ANY(a				)},
               ],
               [
                   {'score': ANY(a				), 'label': ANY(a				)},
                   {'score': ANY(a				), 'label': ANY(a				)},
               ],
           ]						,      )




      @require_torch
      def      _snake_case	(				self:       str				):
       __lowerCamelCase		:							str							=						'hf-internal-testing/tiny-random-vit'
       __lowerCamelCase		:							int							=						pipeline('image-classification'						,      model=a				)

       __lowerCamelCase		:							Dict							=						image_classifier('http://images.cocodataset.org/val2017/000000039769.jpg'				)
       self.assertEqual(
           nested_simplify(a						,      decimals=4				)						,      [{'label': 'LABEL_1', 'score': 0.5_7_4}, {'label': 'LABEL_0', 'score': 0.4_2_6}]						,      )

       __lowerCamelCase		:							int							=						image_classifier(
           [
               'http://images.cocodataset.org/val2017/000000039769.jpg',
               'http://images.cocodataset.org/val2017/000000039769.jpg',
           ]						,      top_k=2						,      )
       self.assertEqual(
           nested_simplify(a						,      decimals=4				)						,      [
               [{'label': 'LABEL_1', 'score': 0.5_7_4}, {'label': 'LABEL_0', 'score': 0.4_2_6}],
               [{'label': 'LABEL_1', 'score': 0.5_7_4}, {'label': 'LABEL_0', 'score': 0.4_2_6}],
           ]						,      )




      @require_tf
      def      _snake_case	(				self:       Optional[int]				):
       __lowerCamelCase		:							int							=						'hf-internal-testing/tiny-random-vit'
       __lowerCamelCase		:							int							=						pipeline('image-classification'						,      model=a						,      framework='tf'				)

       __lowerCamelCase		:							Optional[int]							=						image_classifier('http://images.cocodataset.org/val2017/000000039769.jpg'				)
       self.assertEqual(
           nested_simplify(a						,      decimals=4				)						,      [{'label': 'LABEL_1', 'score': 0.5_7_4}, {'label': 'LABEL_0', 'score': 0.4_2_6}]						,      )

       __lowerCamelCase		:							Tuple							=						image_classifier(
           [
               'http://images.cocodataset.org/val2017/000000039769.jpg',
               'http://images.cocodataset.org/val2017/000000039769.jpg',
           ]						,      top_k=2						,      )
       self.assertEqual(
           nested_simplify(a						,      decimals=4				)						,      [
               [{'label': 'LABEL_1', 'score': 0.5_7_4}, {'label': 'LABEL_0', 'score': 0.4_2_6}],
               [{'label': 'LABEL_1', 'score': 0.5_7_4}, {'label': 'LABEL_0', 'score': 0.4_2_6}],
           ]						,      )




      def      _snake_case	(				self:       int				):
       __lowerCamelCase		:							Union[str, Any]							=						PreTrainedTokenizer()

       # Assert that the pipeline can be initialized with a feature extractor that is not in any mapping
       __lowerCamelCase		:							str							=						pipeline(
           'image-classification'						,      model='hf-internal-testing/tiny-random-vit'						,      tokenizer=a				)

       self.assertIs(image_classifier.tokenizer						,      a				)




      @slow
      @require_torch
      def      _snake_case	(				self:       List[str]				):
       # Perceiver is not tested by `run_pipeline_test` properly.
       # That is because the type of feature_extractor and model preprocessor need to be kept
       # in sync, which is not the case in the current design
       __lowerCamelCase		:							str							=						pipeline('image-classification'						,      model='deepmind/vision-perceiver-conv'				)
       __lowerCamelCase		:							List[str]							=						image_classifier('http://images.cocodataset.org/val2017/000000039769.jpg'				)
       self.assertEqual(
           nested_simplify(a						,      decimals=4				)						,      [
               {'score': 0.4_3_8_5, 'label': 'tabby, tabby cat'},
               {'score': 0.3_2_1, 'label': 'tiger cat'},
               {'score': 0.0_5_0_2, 'label': 'Egyptian cat'},
               {'score': 0.0_1_3_7, 'label': 'crib, cot'},
               {'score': 0.0_0_7, 'label': 'radiator'},
           ]						,      )

       __lowerCamelCase		:							Any							=						pipeline('image-classification'						,      model='deepmind/vision-perceiver-fourier'				)
       __lowerCamelCase		:							int							=						image_classifier('http://images.cocodataset.org/val2017/000000039769.jpg'				)
       self.assertEqual(
           nested_simplify(a						,      decimals=4				)						,      [
               {'score': 0.5_6_5_8, 'label': 'tabby, tabby cat'},
               {'score': 0.1_3_0_9, 'label': 'tiger cat'},
               {'score': 0.0_7_2_2, 'label': 'Egyptian cat'},
               {'score': 0.0_7_0_7, 'label': 'remote control, remote'},
               {'score': 0.0_0_8_2, 'label': 'computer keyboard, keypad'},
           ]						,      )

       __lowerCamelCase		:							Optional[int]							=						pipeline('image-classification'						,      model='deepmind/vision-perceiver-learned'				)
       __lowerCamelCase		:							int							=						image_classifier('http://images.cocodataset.org/val2017/000000039769.jpg'				)
       self.assertEqual(
           nested_simplify(a						,      decimals=4				)						,      [
               {'score': 0.3_0_2_2, 'label': 'tabby, tabby cat'},
               {'score': 0.2_3_6_2, 'label': 'Egyptian cat'},
               {'score': 0.1_8_5_6, 'label': 'tiger cat'},
               {'score': 0.0_3_2_4, 'label': 'remote control, remote'},
               {'score': 0.0_0_9_6, 'label': 'quilt, comforter, comfort, puff'},
           ]						,      )





def       UpperCamelCase__     (  SCREAMING_SNAKE_CASE__ = 100						):
 __lowerCamelCase		:							List[Any]							=						[[0 for _ in range(SCREAMING_SNAKE_CASE__						)] for _ in range(m + 1						)]
 for i in range(m + 1						):
  __lowerCamelCase		:							Any							=						1

 for n in range(m + 1						):
  for k in range(1			,       SCREAMING_SNAKE_CASE__						):
   memo[n][k] += memo[n][k - 1]
   if n > k:
    memo[n][k] += memo[n - k - 1][k]

 return memo[m][m - 1] - 1


if __name__ == "__main__":
       print(solution(int(input('Enter a number: ').strip())))

