def kadomatsu(x): if (x[2]>x[1] and x[0]>x[1]) or (x[2]=0: dp[i+1]=dp[i-2]+a[i] else: dp[i+1]=a[i] dp[i+1]=max(dp[i+1],dp[i]) print(max(dp))