def crazy(A,n):
     if n<=1:
         return A[0]
     s = crazy(A,n-1)
     for i in range(1,n):
         A[i-1] += A[i]
     t = crazy(A,n-1)
     return s+t

A = [1,1,1,1,1]
t = crazy(A,5)
print(t)
