import re


def parse_fdisk_units(fdisk_output: str) -> int:
    """Parse unit size in bytes from fdisk output."""
    regexp = r"^Units: sectors of [0-9]+ \* [0-9]+ = ([0-9]+) bytes$"
    match = re.search(regexp, fdisk_output, re.MULTILINE)
    if not match:
        raise ValueError("can't parse partition table units")
    return int(match.group(1))