Getting runtime error....need help

Problen name-IPL

print max(dp[n-1],dp[n-2],dp[n-3])