def top_k_countries(n_closed, df, idx_initial):
    """
    Computes the top countries with more traffic of tourism (arrivals+departures)
    according the parameter n_closed, that indicates how many countries to close.

    Parameters
    ----------
    n_closed : int
        Countries to close.
    df : pandas.DataFrame
    idx_initial : int
        Index of the country when the epidemic started.

    Returns
    -------
    idx_countries : list
        List with the index of the countries to close.

    """

    traffic = df['arrivals'] + df['departures']
    idx_countries = list(traffic.nlargest(n=n_closed).index)
    if idx_initial not in idx_countries and n_closed != 0:
        idx_countries.append(idx_initial)

    return idx_countries