

'''simple docstring'''
import unittest

import numpy as np

from diffusers import OnnxStableDiffusionInpaintPipelineLegacy
from diffusers.utils.testing_utils import (
    is_onnx_available,
    load_image,
    load_numpy,
    nightly,
    require_onnxruntime,
    require_torch_gpu,
)


if is_onnx_available():
					import onnxruntime as ort
@nightly
@require_onnxruntime
@require_torch_gpu
class 					_snake_case		(unittest.TestCase):






			@property
			def 		UpperCamelCase__							(  self     ):
				return (
				    "CUDAExecutionProvider",
				    {
				        "gpu_mem_limit": "15000000000",  # 15GB
				        "arena_extend_strategy": "kSameAsRequested",
				    },
				)






			@property
			def 		UpperCamelCase__							(  self     ):
				UpperCAmelCase_     :      Tuple						=  ort.SessionOptions()
				UpperCAmelCase_     :      Any						=  False
				return options






			def 		UpperCamelCase__							(  self     ):
				UpperCAmelCase_     :      int						=  load_image(
				    "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
				    "/in_paint/overture-creations-5sI6fQgYIuo.png"     )
				UpperCAmelCase_     :      Dict						=  load_image(
				    "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
				    "/in_paint/overture-creations-5sI6fQgYIuo_mask.png"     )
				UpperCAmelCase_     :      Optional[int]						=  load_numpy(
				    "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"
				    "/in_paint/red_cat_sitting_on_a_park_bench_onnx.npy"     )

				# using the PNDM scheduler by default
				UpperCAmelCase_     :      int						=  OnnxStableDiffusionInpaintPipelineLegacy.from_pretrained(
				    "CompVis/stable-diffusion-v1-4"			,revision="onnx"			,safety_checker=_snake_case			,feature_extractor=_snake_case			,provider=self.gpu_provider			,sess_options=self.gpu_options			,)
				pipe.set_progress_bar_config(disable=_snake_case     )

				UpperCAmelCase_     :      Optional[Any]						=  "A red cat sitting on a park bench"

				UpperCAmelCase_     :      str						=  np.random.RandomState(0     )
				UpperCAmelCase_     :      str						=  pipe(
				    prompt=_snake_case			,image=_snake_case			,mask_image=_snake_case			,strength=0.75			,guidance_scale=7.5			,num_inference_steps=15			,generator=_snake_case			,output_type="np"			,)

				UpperCAmelCase_     :      List[str]						=  output.images[0]

				assert image.shape == (5_12, 5_12, 3)
				assert np.abs(expected_image - image     ).max() < 1E-2











def  __magic_name__  (				lowercase = 1000				)				-> int:

							"""simple docstring"""



							lowercase_				,		lowercase_	:   Optional[Any]  				=     1, 1
							lowercase_	:   Tuple  				=     2
							while True:
														lowercase_	:   Dict  				=     0
														lowercase_	:   List[Any]  				=     fa + fa
														lowercase_				,		lowercase_	:   List[str]  				=     fa, f
														index += 1
														for _ in str(lowercase				):
																					i += 1
														if i == n:
																					break
							return index


if __name__ == "__main__":
							print(solution(int(str(input()).strip())))