diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -3,4 +3,4 @@
 _ = input()
 first, *others = map(int, input().split())
 ans = sum(1 for x in takewhile(lambda x: x <= first, others))
-print(-1 if ans == 0 else ans + 1)
+print(-1 if ans == len(others) else (ans + 2))
