from typing import Tuple


def parse_uleb128p1(data: bytes) -> Tuple[int, int]:
    """Parse uleb128p1 and return (value, length in bytes)."""
    i = 0
    val = data[i] & 0x7F
    while data[i] & 0x80:
        i += 1
        val |= (data[i] & 0x7F) << (7 * i)
    return val - 1, i + 1