





'''simple docstring'''


def 		__a(SCREAMING_SNAKE_CASE_					:   int      ):



    '''simple docstring'''





    barcode //= 10  # exclude the last digit
    _lowerCAmelCase		     = False
    _lowerCAmelCase		     = 0

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

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


def 		__a(SCREAMING_SNAKE_CASE_					:   int      ):



    '''simple docstring'''





    return len(str(SCREAMING_SNAKE_CASE_      )      ) == 13 and get_check_digit(SCREAMING_SNAKE_CASE_      ) == barcode % 10


def 		__a(SCREAMING_SNAKE_CASE_					:   str      ):



    '''simple docstring'''





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


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  _SCREAMING_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 		__a(SCREAMING_SNAKE_CASE_					:   int = 1000      ):



    '''simple docstring'''





    return sum(i for i in range(SCREAMING_SNAKE_CASE_      ) if i % 3 == 0 or i % 5 == 0      )


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


