def school2nation(id_num):
    """
    Takes school id, returns nation id of the school.
    """
    if id_num < 97100000:
        return id_num // 100000 * 10000
    if id_num < 97200000:
        return 7240000
    if id_num < 97400000:
        return 8400000
    return 320100