def _c2r(reference_length, coverage, read_length):
    """
    Calculate the number of fragments based on the desired coverage.

    :arg int reference_length: Lenght of the reference sequence.
    :arg int coverage: Desired coverage.
    :arg int read_length: Size of the reads.

    :return int: Number of fragments.
    """
    return reference_length * coverage // (read_length * 2)
