def calculate_mins(time_string):
    """Convert a time string into minutes."""
    hours, mins = time_string.split()
    hour_num = int(hours.replace('h', ''))
    min_num = int(mins.replace('min', ''))
    return hour_num * 60 + min_num