def METHOD_NAME(order, index):
    N = n_side_points(order)
    for i in range(N):
	first = i*N - i*(i-1)/2
	last = (i+1)*N - (i+1)*i/2 - 1
	for j in range(N-i):
	    if index == first+j:
		return last-j