



"""simple docstring"""


def 				_lowerCAmelCase   (     lowercase_		):
						barcode //= 10  # exclude the last digit
						UpperCAmelCase    =				False
						UpperCAmelCase    =				0

						# extract and check each digit
						while barcode != 0:
												UpperCAmelCase    =				1 if checker else 3
												s += mult * (barcode % 10)
												barcode //= 10
												UpperCAmelCase    =				not checker

						return (10 - (s % 10)) % 10

def 				_lowerCAmelCase   (     lowercase_		):
						return len(str(UpperCamelCase__		)		) == 13 and get_check_digit(UpperCamelCase__		) == barcode % 10

def 				_lowerCAmelCase   (     lowercase_		):
						if str(UpperCamelCase__		).isalpha():
												UpperCAmelCase    =				F"""Barcode \'{barcode}\' has alphabetic characters."""
												raise ValueError(UpperCamelCase__		)
						elif int(UpperCamelCase__		) < 0:
												raise ValueError('The entered barcode has a negative value. Try again.'		)
						else:
												return int(UpperCamelCase__		)


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			snake_case_         = get_barcode(input("""Barcode: """).strip())

			if is_valid(barcode):
						print(f'''\'{barcode}\' is a valid barcode.''')
			else:
						print(f'''\'{barcode}\' is NOT a valid barcode.''')










"""simple docstring"""


def 				_lowerCAmelCase   (     lowercase_	,			lowercase_		):
						UpperCAmelCase    =				1.0
						for i in range(1	,			r + 1		):
												ret *= (n + 1 - i) / i
						return round(lowercase_		)

def 				_lowerCAmelCase   (     lowercase_		):
						return choose(8 + n	,			lowercase_		) + choose(9 + n	,			lowercase_		) - 10

def 				_lowerCAmelCase   (     lowercase_		):
						return sum(non_bouncy_exact(lowercase_		) for i in range(1	,			n + 1		)		)

def 				_lowerCAmelCase   (     lowercase_ = 100		):
						return non_bouncy_upto(lowercase_		)


if __name__ == "__main__":
				print(f'''{solution() = }''')





