def cutoff_fn(good_mean: float, good_std: float, bad_mean: float, bad_std: float) -> float:
    """
    Calculate the cutoff value
    :param good_mean: Mean of the good samples
    :param good_std: Standard deviation of the good samples
    :param bad_mean: Mean of the bad samples
    :param bad_std: Standard deviation of the bad samples
    :return: The cutoff value
    """
    return (abs(bad_mean - good_mean) / (good_std + bad_std)) * good_std + good_mean