def facet_plot_dimensions(n_activities):
    """Returns dimension N of a N x N facet plot that fits n_activities.

    Args:
        n_activities (int): Number of activities to be plotted.

    Returns:
        int: The number of rows and columns to be used.
    """
    return min(i for i in range(100) if i**2 >= n_activities)