diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -1,3 +1,3 @@
 n, p, q = map(int, input().split(" "))
 d = list(map(int, input().split(" ")))
-print(min(p, p - q + min(d)))
+print(min(p, q + min(d)))
