Get Maximum in Generated Array

给一个数字n, 求n个数字组成的数组, 满足arr[0] = 0; arr[1] = 1; arr[偶数] = arr[偶数/2]; arr[奇数] = arr[奇数/2] + arr[奇数/2+1] 的最大数.