diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -10,6 +10,6 @@
     for j in range(n):
         for k in range(n):
             total = an[i] + an[j] + an[k]
-            if total != 0 and total < w and i != j and i != k and j != k:
+            if total != 0 and total <= w and i != j and i != k and j != k:
                 ans.add(total)
 print(len(ans))
