


'''simple docstring'''


import unittest

from transformers.image_processing_utils import get_size_dict





class    lowercase__  (						unittest.TestCase ):





							'''simple docstring'''


							def UpperCAmelCase_     (   self  ):
											# Test a dict with the wrong keys raises an error
											_SCREAMING_SNAKE_CASE			:	Optional[int]							=				{"""wrong_key""": 224}
											with self.assertRaises(__snake_case  ):
															get_size_dict(__snake_case  )

											_SCREAMING_SNAKE_CASE			:	List[Any]							=				{"""height""": 224}
											with self.assertRaises(__snake_case  ):
															get_size_dict(__snake_case  )

											_SCREAMING_SNAKE_CASE			:	Union[str, Any]							=				{"""width""": 224, """shortest_edge""": 224}
											with self.assertRaises(__snake_case  ):
															get_size_dict(__snake_case  )

											# Test a dict with the correct keys is returned as is
											_SCREAMING_SNAKE_CASE			:	Optional[Any]							=				{"""height""": 224, """width""": 224}
											_SCREAMING_SNAKE_CASE			:	str							=				get_size_dict(__snake_case  )
											self.assertEqual(__snake_case   , __snake_case  )

											_SCREAMING_SNAKE_CASE			:	int							=				{"""shortest_edge""": 224}
											_SCREAMING_SNAKE_CASE			:	int							=				get_size_dict(__snake_case  )
											self.assertEqual(__snake_case   , {"""shortest_edge""": 224}  )

											_SCREAMING_SNAKE_CASE			:	Dict							=				{"""longest_edge""": 224, """shortest_edge""": 224}
											_SCREAMING_SNAKE_CASE			:	Union[str, Any]							=				get_size_dict(__snake_case  )
											self.assertEqual(__snake_case   , {"""longest_edge""": 224, """shortest_edge""": 224}  )

											# Test a single int value which  represents (size, size)
											_SCREAMING_SNAKE_CASE			:	Optional[int]							=				get_size_dict(224  )
											self.assertEqual(__snake_case   , {"""height""": 224, """width""": 224}  )

											# Test a single int value which represents the shortest edge
											_SCREAMING_SNAKE_CASE			:	Tuple							=				get_size_dict(224   , default_to_square=__snake_case  )
											self.assertEqual(__snake_case   , {"""shortest_edge""": 224}  )

											# Test a tuple of ints which represents (height, width)
											_SCREAMING_SNAKE_CASE			:	Optional[Any]							=				get_size_dict((150, 200)  )
											self.assertEqual(__snake_case   , {"""height""": 150, """width""": 200}  )

											# Test a tuple of ints which represents (width, height)
											_SCREAMING_SNAKE_CASE			:	List[str]							=				get_size_dict((150, 200)   , height_width_order=__snake_case  )
											self.assertEqual(__snake_case   , {"""height""": 200, """width""": 150}  )

											# Test an int representing the shortest edge and max_size which represents the longest edge
											_SCREAMING_SNAKE_CASE			:	Dict							=				get_size_dict(224   , max_size=256   , default_to_square=__snake_case  )
											self.assertEqual(__snake_case   , {"""shortest_edge""": 224, """longest_edge""": 256}  )

											# Test int with default_to_square=True and max_size fails
											with self.assertRaises(__snake_case  ):
															get_size_dict(224   , max_size=256   , default_to_square=__snake_case  )








'''simple docstring'''


def       snake_case_       (  SCREAMING_SNAKE_CASE__ = 1000					):







				"""simple docstring"""





				_SCREAMING_SNAKE_CASE			:	Union[str, 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)
				_SCREAMING_SNAKE_CASE			:	str							=				[0, 0, 6, 6, 5, 5, 5, 7, 6, 6]

				_SCREAMING_SNAKE_CASE			:	Any							=				0

				for i in range(1							,				n + 1					):
								if i < 1000:
												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 // 1000] + 8
				return count


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




