Solution to survivor problem given the number of chairs to be placed in a circular manner