


import torch
import torch.nn.functional as F

from diffusers import VQDiffusionScheduler

from .test_schedulers import SchedulerCommonTest

class   A__							(						SCREAMING_SNAKE_CASE__     ):
						UpperCAmelCase									=  (VQDiffusionScheduler,)




						def 							__UpperCamelCase (				self    :					Any ,			**_a    :					Any     )							->   Optional[Any]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE	     ={
										    "num_vec_classes": 4097,
										    "num_train_timesteps": 100,
										}

										config.update(**snake_case__     )
										return config




						def 							__UpperCamelCase (				self    :					Tuple ,			_a    :					Dict     )							->   List[Any]:


										"""simple docstring"""





										_SCREAMING_SNAKE_CASE	     =4
										_SCREAMING_SNAKE_CASE	     =8
										_SCREAMING_SNAKE_CASE	     =8

										_SCREAMING_SNAKE_CASE	     =torch.randint(0 ,			snake_case__ ,			(batch_size, height * width)     )

										return sample




						@property
						def 							__UpperCamelCase (				self    :					List[Any]     )							->   List[Any]:


										"""simple docstring"""





										assert False




						def 							__UpperCamelCase (				self    :					Dict ,			_a    :					Union[str, Any]     )							->   Any:


										"""simple docstring"""





										def model(_a    :					List[str] ,			_a    :					Optional[int] ,			*_a    :					Optional[int]     ):
														_SCREAMING_SNAKE_CASE	     =sample.shape
														_SCREAMING_SNAKE_CASE	     =torch.rand((batch_size, num_vec_classes - 1, num_latent_pixels)     )
														_SCREAMING_SNAKE_CASE	     =F.log_softmax(logits.double() ,			dim=1     ).float()
														return return_value

										return model




						def 							__UpperCamelCase (				self    :					List[str]     )							->   str:


										"""simple docstring"""





										for timesteps in [2, 5, 100, 1000]:
														self.check_over_configs(num_train_timesteps=snake_case__     )




						def 							__UpperCamelCase (				self    :					Tuple     )							->   Dict:


										"""simple docstring"""





										for num_vec_classes in [5, 100, 1000, 4000]:
														self.check_over_configs(num_vec_classes=snake_case__     )




						def 							__UpperCamelCase (				self    :					int     )							->   Tuple:


										"""simple docstring"""





										for t in [0, 50, 99]:
														self.check_over_forward(time_step=snake_case__     )




						def 							__UpperCamelCase (				self    :					int     )							->   List[str]:


										"""simple docstring"""





										pass







"""simple docstring"""







def 						lowercase__(A = 1_000						)				->int:




						"""simple docstring"""



						lowercase__				:      Any=       [0, 3, 3, 5, 4, 4, 3, 5, 5, 4, 3, 6, 6, 8, 8, 7, 7, 9, 8, 8]
						# number of letters in twenty, thirty, ..., ninety (0 for numbers less than
						# 20 due to inconsistency in teens)
						lowercase__				:      List[str]=       [0, 0, 6, 6, 5, 5, 5, 7, 6, 6]

						lowercase__				:      Dict=       0

						for i in range(1					,		n + 1						):
												if i < 1_000:
																		if i >= 100:
																								# add number of letters for "n hundred"
																								count += ones_counts[i // 100] + 7

																								if i % 100 != 0:
																														# add number of letters for "and" if number is not multiple
																														# of 100
																														count += 3

																		if 0 < i % 100 < 20:
																								# add number of letters for one, two, three, ..., nineteen
																								# (could be combined with below if not for inconsistency in
																								# teens)
																								count += ones_counts[i % 100]
																		else:
																								# add number of letters for twenty, twenty one, ..., ninety
																								# nine
																								count += ones_counts[i % 10]
																								count += tens_counts[(i % 100 - i % 10) // 10]
												else:
																		count += ones_counts[i // 1_000] + 8
						return count


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






