We are given a balance and n weights of weight 2^0, 2^1, ..., 2^(N − 1), where N is an integer. In a sequence of N moves we place all weights on the balance. In the first move we choose a weight and put it on the left pan. In each of the following moves we choose one of the remaining weights and we add it either to the left or to the right pan. Write a program that computes the number of ways in which we can perform these N moves in such a way that the right pan is never heavier than the left pan.