import math


def cost_to_time(cost, avg_seek_time=8, avg_latency=4):
    """
    Converts a disk I/O metric to a milliseconds.
    :param cost: The disk I/O metric to convert.
    :param avg_seek_time: The average seek time in milliseconds.
    :param avg_latency: The average latency in milliseconds.
    :return: A disk I/O in milliseconds.
    """
    return int(
        math.ceil(
            cost *
            ((avg_seek_time/1000) +
            (avg_latency/1000))
        )
    )