import math


def dryness_formula(days: int, num_storys: int) -> int:
    """
    Dryness(0~1000)

    >>> assert dryness_formula(30, 255) == 0, '255 storys per month'
    >>> assert dryness_formula(30, 127) == 125, '127 storys per month'
    >>> assert dryness_formula(30, 63) == 250, '63 storys per month'
    >>> assert dryness_formula(30, 31) == 375, '31 storys per month'
    >>> assert dryness_formula(30, 15) == 500, '15 storys per month'
    >>> assert dryness_formula(30, 7) == 625, '7 storys per month'
    >>> assert dryness_formula(30, 3) == 750, '3 storys per month'
    >>> assert dryness_formula(30, 1) == 875, '1 storys per month'
    >>> assert dryness_formula(30, 0) == 1000, '0 storys per month'
    >>> assert dryness_formula(1, 0) == 1000, '0 storys per day'
    >>> assert dryness_formula(0, 0) == 1000, '0 storys'
    """
    v = math.log2(256 / (num_storys / (days + 1) * 31 + 1))
    return max(0, min(1000, round(v / 8 * 1000)))