from typing import Tuple


def octet_string_to_integer_primitive(octet_string: bytes) -> Tuple[int, int]:
    """Convert an octet string to a nonnegative integer."""
    # https://tools.ietf.org/html/rfc8017#section-4.2
    integer = \
        sum(value * (256 ** index)
            for index, value in enumerate(reversed(octet_string)))
    return len(octet_string), integer