def xxd_size(len_bytes: int) ->int:
    """Returns the length of an xxd style string given the number of bytes."""
    ret = 2 * len_bytes + 1 + len_bytes
    if len_bytes > 2:
        ret += len_bytes // 2 - 1
    return ret
