def sum_max_three(grid_values):
    """
    Calculates the sum of the maximal three values of the grid.
    :param grid_values: values of the grid
    :return: metrics score
    """
    score = sum(sorted(grid_values, reverse=True)[:3])
    return score