diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -18,7 +18,7 @@
 
 for elem, cnt in elem_and_cnt:
     if cnt % 2 == 1:
-        print(cnt - 1)
+        print(elem - 1)
         exit(0)
 
 print(0)
