diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -1,5 +1,5 @@
 N = int(input())
-A = input()
+A = list(map(int, input().split()))
 count = 0
 for i in range(2 * N - 2):
     if A[i] == A[i + 2]:
