


import sys


def 	_UpperCamelCase							(				lowercase__   ,	lowercase__				):
						if not numbers:
												return 0
						if target == 0 and target in numbers:
												return 0
						if not isinstance(lowercase__   ,	(list, tuple)				) or not all(
						    isinstance(lowercase__   ,	lowercase__				) for number in numbers				):
												raise ValueError('''numbers must be an iterable of integers'''				)

						__SCREAMING_SNAKE_CASE						:					List[str]		      =		0
						__SCREAMING_SNAKE_CASE						:					Optional[int]		      =		sys.maxsize

						while right < len(lowercase__				):
												curr_sum += numbers[right]
												while curr_sum >= target and left <= right:
																		__SCREAMING_SNAKE_CASE						:					List[Any]		      =		min(lowercase__   ,	right - left + 1				)
																		curr_sum -= numbers[left]
																		left += 1
												right += 1

						return 0 if min_len == sys.maxsize else min_len








def 	_UpperCamelCase							(				lowercase__				):
						barcode //= 10  # exclude the last digit
						__SCREAMING_SNAKE_CASE						:					Optional[Any]		      =		False
						__SCREAMING_SNAKE_CASE						:					Dict		      =		0

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

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


def 	_UpperCamelCase							(				lowercase__				):
						return len(str(lowercase__				)				) == 13 and get_check_digit(lowercase__				) == barcode % 10


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


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						__lowerCAmelCase     :			Union[str, Any]      =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.""")
