def minimum_grade(parsed_list, passing_grade, overall_min=True):
    """
    This function calculates the minimum grade from the given grades.

    :param parsed_list: the parsed list of the grades
    :param passing_grade: the grade passing threshold
    :param overall_min: True, when calculating the minimum of all the grades,
    False, when calculating the minimum of the passing grades
    :return: the minimum element of the given as input parsed list
    """
    if overall_min is False:
        passing_grades_list = (
            [item for item in parsed_list if item >= passing_grade]
        )

        if len(passing_grades_list) > 0:
            min_value = min(passing_grades_list)

        else:
            min_value = "-"

    else:
        min_value = min(parsed_list)

    return min_value