diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -14,5 +14,5 @@
         for j in range(1, i + 1):
             dp[i][j] = dp[i - 1][j - 1] + xl[i] + yl[j]
         if i != 1:
-            dp[i][0] = max(dp[i - 2]) + xl[i] + yl[j]
+            dp[i][0] = max(dp[i - 2]) + xl[i] + yl[0]
 print(max(dp[n - 1]))
