diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -1,4 +1,4 @@
 n = int(input())
 p = list(map(int, input().split()))
-ans = p[0] if p.count(max(p)) == 1 and p[0] == max(p) else max(p) + 1 - p[0]
+ans = 0 if p.count(max(p)) == 1 and p[0] == max(p) else max(p) + 1 - p[0]
 print(ans)
