Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n, x, y = map(int, input().split())
x -= 1
y -= 1
list1 = [0] * (n * n)

for i in range(n):
    for j in range(n):
        if list1[n * j + i]  != 0:
            continue
        
        list1[n * i + j] = min([abs(j - i), abs(x - i) + 1 + abs(j - y), abs(y - i) + 1 + abs(x - j)])
        
#list2 = list(itertools.chain.from_iterable(list1))

for k in range(1,n):
    print(list1.count(k))

Fixed submission:
n, x, y = map(int, input().split())
x -= 1
y -= 1

cnt_list = [0] * (n - 1)

for i in range(n):
    for j in range(n):
        if j <= i:
            continue
        
        #i < j,x < yのとき、i→y→x→jが最短になることはない
        num = min([j - i, abs(x - i) + 1 + abs(y - j)]) - 1 #距離 - 1、距離ゼロはif文で排除
        cnt_list[num] += 1

for n in cnt_list:
    print(n)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n, x, y = map(int, input().split())
x -= 1
y -= 1
list1 = [[0 for i in range(n)] for j in range(n)]

for i in range(n):
    for j in range(n):
        if list1[j][i] != 0:
            continue
        
        num = min([abs(j - i), abs(x - i) + 1 + abs(j - y), abs(y - i) + 1 + abs(x - j)])
        list1[i][j] = num

list2 = list(itertools.chain.from_iterable(list1))

for k in range(1,n):
    print(list2.count(k))

Fixed submission:
n, x, y = map(int, input().split())
x -= 1
y -= 1

cnt_list = [0] * (n - 1)

for i in range(n):
    for j in range(n):
        if j <= i:
            continue
        
        #i < j,x < yのとき、i→y→x→jが最短になることはない
        num = min([j - i, abs(x - i) + 1 + abs(y - j)]) - 1 #距離 - 1、距離ゼロはif文で排除
        cnt_list[num] += 1

for n in cnt_list:
    print(n)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
n, x, y = map(int, input().split())
x -= 1
y -= 1
list1 = [[0 for i in range(n)] for j in range(n)]

for i in range(n):
    for j in range(n):
        num = min([abs(j - i), abs(x - i) + 1 + abs(j - y), abs(y - i) + 1 + abs(x - j)])
        list1[i][j] = num

list2 = list(itertools.chain.from_iterable(list1))

for k in range(1,n):
    print(list2.count(k) // 2)

Fixed submission:
n, x, y = map(int, input().split())
x -= 1
y -= 1

cnt_list = [0] * (n - 1)

for i in range(n):
    for j in range(n):
        if j <= i:
            continue
        
        #i < j,x < yのとき、i→y→x→jが最短になることはない
        num = min([j - i, abs(x - i) + 1 + abs(y - j)]) - 1 #距離 - 1、距離ゼロはif文で排除
        cnt_list[num] += 1

for n in cnt_list:
    print(n)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

cnt = 0
for i in range(q):
    q_very = input()

    #print(q_very)
    if q_very[0] == '1':
        #print('t is 1')
        cnt += 1
    else:
        instruction = q_very.split()
        # 反転していない
        if cnt % 2 == 0:
            if instruction[1] == '1':
                s = instruction[2] + s
            else:
                s = s + instruction[2]
        else:
            if instruction[1] == '1':
                s = s + instruction[2]
            else:
                s = instruction[2] + s

if cnt % 2 != 0:
    s = s[::-1]
print(s)

Fixed submission:
s = input()
q = int(input())

cnt = 0
left = ''
right = ''
for i in range(q):
    q_very = input()

    #print(q_very)
    if q_very[0] == '1':
        #print('t is 1')
        cnt += 1
    else:
        instruction = q_very.split()
        # 反転していない
        if cnt % 2 == 0:
            if instruction[1] == '1':
                left = instruction[2] + left
            else:
                right = right + instruction[2]
        else: # 反転している
            if instruction[1] == '1':
                right = right + instruction[2]
            else:
                left = instruction[2] + left

s = left + s + right

if cnt % 2 != 0:
    s = s[::-1]
print(s)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())

for i in range(q):
    prototype = input()
    if prototype == '1':
        s_copy = ""
        for j in range(len(s)):
            s_copy = s_copy + s[(len(s) - 1) - j]
        
        s = s_copy
    else:
        num, f_num, c = prototype.split()
        
        if(f_num == '1'):
            s = c + s
        else:
            s = s + c

print(s)

Fixed submission:
s = input()
q = int(input())

cnt = 0
left = ''
right = ''
for i in range(q):
    q_very = input()

    #print(q_very)
    if q_very[0] == '1':
        #print('t is 1')
        cnt += 1
    else:
        instruction = q_very.split()
        # 反転していない
        if cnt % 2 == 0:
            if instruction[1] == '1':
                left = instruction[2] + left
            else:
                right = right + instruction[2]
        else: # 反転している
            if instruction[1] == '1':
                right = right + instruction[2]
            else:
                left = instruction[2] + left

s = left + s + right

if cnt % 2 != 0:
    s = s[::-1]
print(s)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())

if 0 < m:
    s_c = [0] * (m * 2)
    for i in range(m):
        s_c[2 * i], s[2 * i + 1] = map(int, input().split())
    

for i in range(0, m * 2 , 2):
    s_c[i] -= 1

num = [-1] * n
flag = False
for i in range(m):
    if num[s_c[2 * i]] != -1 and num[s_c[2 * i]] != s_c[2 * i + 1]:
        #print("diffrent")
        flag = True
    else:
        num[s_c[2 * i]] = s_c[2 * i + 1]
        
for i in range(n):
    if num[i] == -1:
        num[i] = 0
        
#print(num)
    
if 1 < n and num[0] == 0:
    #print("head is 0")
    flag = True

if flag:
    print(-1)
else:
    print(''.join([str(n) for n in num]))

Fixed submission:
n, m = map(int, input().split())

s = [0] * m
c = [0] * m

for i in range(m):
    s[i], c[i] = map(int, input().split())
    s[i] -= 1
    
num = [10] * n

flag = False
for i in range(m):
    if num[s[i]] != 10 and num[s[i]] != c[i]:
        #print("dif")
        flag = True
    else:
        num[s[i]] = c[i]
        
if 1 < n and num[0] == 0:
    #print("head is 0")
    flag = True
elif 1 < n and num[0] == 10:
    num[0] = 1

for i in range(n):
    if num[i] == 10:
        num[i] = 0

if flag:
    print(-1)
else:
    print(''.join([str(n) for n in num]))

Buggy python submission (verdict: Runtime Error):
n, m, *s_c = map(int, open(0).read().split())

for i in range(0, m + 1, 2):
    s_c[i] -= 1

flag = False
for i in range(0, m + 1, 2):
    if flag:
        break
    for j in range(0, m + 1, 2):
        #print(i, j)
        #print(s_c[i], s_c[j], s_c[i + 1], s_c[j + 1])
        if s_c[i] == s_c[j] and s_c[i + 1] != s_c[j + 1]:
            flag = True
            break

if flag:
    print(-1)
else:
    num = [0] * 3
    for i in range(0, m, 2):
        num[s_c[i]] = s_c[i + 1] 
    if num[0] == 0:
        print(-1)
    else:
        print(''.join([str(n) for n in num]))

Fixed submission:
n, m = map(int, input().split())

s = [0] * m
c = [0] * m

for i in range(m):
    s[i], c[i] = map(int, input().split())
    s[i] -= 1
    
num = [10] * n

flag = False
for i in range(m):
    if num[s[i]] != 10 and num[s[i]] != c[i]:
        #print("dif")
        flag = True
    else:
        num[s[i]] = c[i]
        
if 1 < n and num[0] == 0:
    #print("head is 0")
    flag = True
elif 1 < n and num[0] == 10:
    num[0] = 1

for i in range(n):
    if num[i] == 10:
        num[i] = 0

if flag:
    print(-1)
else:
    print(''.join([str(n) for n in num]))
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())

cnt = 0
while True:
  n //= k
  cnt += 1
  if n == k:
    cnt += 2
    break
    
print(cnt)
  

Fixed submission:
n, k = map(int, input().split())
cnt = 0
while n >= k:
  n //= k
  cnt += 1
    
print(cnt + 1)
Buggy python submission (verdict: Time Limit Exceeded):
n, *str_n = open(0).read().split()
n = int(n)
dic = list(set(str_n))
dic.sort()
str_n.sort()

cnt = [0] *len(dic)
j = 0
for i in range(n-1):
    if str_n[i] == str_n[i+1]:
        cnt[j] += 1
    else:
        j += 1
        
max_vote = [i for i, v in enumerate(cnt) if v == max(cnt)]
        
for i in max_vote:
    print(dic[i])

Fixed submission:
import collections

n, *s_n = open(0).read().split()
n = int(n)

dic = collections.Counter(s_n)

dic_values_max = max(list(dic.values()))

max_key = [i for i, j in dic.items() if j == dic_values_max]

max_key.sort()

for k in max_key:
    print(k)

Buggy python submission (verdict: Time Limit Exceeded):
n, *str_n = open(0).read().split()
n = int(n)
dictionary = list(set(str_n))
dictionary.sort()
dic_num = [0] * len(dictionary)

for i in range(n):
    for word in dictionary:
        if str_n[i] == word:
            dic_num[dictionary.index(word)] += 1

max_vote = [i for i, v in enumerate(dic_num) if v == max(dic_num)]

for i in max_vote:
    print(dictionary[i])

Fixed submission:
import collections

n, *s_n = open(0).read().split()
n = int(n)

dic = collections.Counter(s_n)

dic_values_max = max(list(dic.values()))

max_key = [i for i, j in dic.items() if j == dic_values_max]

max_key.sort()

for k in max_key:
    print(k)
Buggy python submission (verdict: Time Limit Exceeded):
n, k, *p_n = map(int, open(0).read().split())

exp = [0] * (n - k + 1)

for i in range(n - k + 1):
    total = 0
    for j in range(k):
        total += (p_n[i + j] + 1)
        
    exp[i] = total * 0.5
    
print(max(exp))

Fixed submission:
n, k, *p_n = map(int, open(0).read().split())
p_n.insert(0, 0)
for i in range(n):
    p_n[i + 1] = ((p_n[i + 1] + 1) / 2) + p_n[i]

exp_sum = [0] * (n - k + 1)
for i in range(n - k + 1):
    exp_sum[i] = p_n[i + k] - p_n[i]
    
print(max(exp_sum))

Buggy python submission (verdict: Time Limit Exceeded):
n, k, *p_n = map(int, open(0).read().split())

exp = [0] * (n - k + 1)

for i in range(n - k + 1):
    total = 0
    for j in range(k):
        total += (p_n[i + j] + 1)
        
    exp[i] = total * 0.5
    
print(max(exp))

Fixed submission:
n, k, *p_n = map(int, open(0).read().split())
p_n.insert(0, 0)
for i in range(n):
    p_n[i + 1] = ((p_n[i + 1] + 1) / 2) + p_n[i]

exp_sum = [0] * (n - k + 1)
for i in range(n - k + 1):
    exp_sum[i] = p_n[i + k] - p_n[i]
    
print(max(exp_sum))
Buggy python submission (verdict: Time Limit Exceeded):
enemy_num, dethblow_num, *enemy_hp = map(int, open(0).read().split())

if enemy_num >= dethblow_num:
    for i in range(dethblow_num):
        enemy_hp.remove(max(enemy_hp))
else:
    enemy_hp.clear()
    enemy_hp = [0]
    
print(sum(enemy_hp))

Fixed submission:
enemy_num, dethblow_num, *enemy_hp = map(int, open(0).read().split())

if enemy_num >= dethblow_num:
    enemy_hp.sort(reverse=True)
    del enemy_hp[:dethblow_num]
else:
    enemy_hp.clear()
    enemy_hp = [0]
    
print(sum(enemy_hp))
Buggy python submission (verdict: Time Limit Exceeded):
n, *p_n = map(int, open(0).read().split())

count = 0
for i in range(n):
    if min(p_n[:i+1]) == p_n[i]:
        count += 1
print(count)

Fixed submission:
n, *p_n = map(int, open(0).read().split())

count = 0
p_n_min = p_n[0]
for i in range(n):
    p_n_min = min(p_n_min,p_n[i])
    if p_n_min == p_n[i]:
        count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
n, *p_n = map(int, open(0).read().split())

count = 0
for i in range(n):
    for j in range(i):
        if p_n[i] > p_n[j]:
            break
        if j == i-1:
            count += 1
            

print(count + 1)


Fixed submission:
n, *p_n = map(int, open(0).read().split())

count = 0
p_n_min = p_n[0]
for i in range(n):
    p_n_min = min(p_n_min,p_n[i])
    if p_n_min == p_n[i]:
        count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
from collections import deque
import copy


def bfs(start, s):
    h = len(s)
    w = len(s[0])
    distance = 0
    maze = [[-1] * w for _ in range(h)]
    maze[start[0]][start[1]] = 0
    s[start[0]][start[1]] = "#"
    drcs = [[-1, 0], [1, 0], [0, -1], [0, 1]]
    q = deque()
    q.append(start)
    while(q):
        cr, cc = q.popleft()
        for dr, dc in drcs:
            nr, nc = cr + dr, cc+ dc
            if nr < 0 or nc < 0 or nr >= h or nc >= w:
                continue
            if s[nr][nc] == ".":
                q.append([nr, nc])
                s[nr][nc] == "#"
                maze[nr][nc] = maze[cr][cc] + 1
                if maze[nr][nc] > distance:
                    distance = maze[nr][nc]
                    goal = [nr][nc]
    return goal, distance
    


def main():
    h, w = map(int, input().split())
    s = [list(input()) for _ in range(h)]
    for r in range(h):
        if "." in s[r]:
            start = [r, s[r].index(".")]
    goal, distance = bfs(start, copy.deepcopy(s))
    _, res = bfs(goal, s)
    print(res)


if __name__ == '__main__':
    main()

Fixed submission:
from collections import deque
import copy


def bfs(start, s):
    h = len(s)
    w = len(s[0])
    distance = 0
    maze = [[-1] * w for _ in range(h)]
    maze[start[0]][start[1]] = 0
    s[start[0]][start[1]] = "#"
    drcs = [[-1, 0], [1, 0], [0, -1], [0, 1]]
    q = deque()
    q.append(start)
    while(q):
        cr, cc = q.popleft()
        for dr, dc in drcs:
            nr, nc = cr + dr, cc + dc
            if nr < 0 or nc < 0 or nr >= h or nc >= w:
                continue
            if s[nr][nc] == ".":
                q.append([nr, nc])
                s[nr][nc] = "#"
                maze[nr][nc] = maze[cr][cc] + 1
                if maze[nr][nc] > distance:
                    distance = maze[nr][nc]
                    goal = [nr, nc]
    return goal, distance
    


def main():
    h, w = map(int, input().split())
    s = [list(input()) for _ in range(h)]
    for r in range(h):
        if "." in s[r]:
            start = [r, s[r].index(".")]
    goal, distance = bfs(start, copy.deepcopy(s))
    _, res = bfs(goal, s)
    print(res)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import copy

def dic_num(N, s):
    factorial = 1
    cnt = 0
    ss = [0] * N
    for i in range(1, N+1):
        ss[i-1] = i
    
    for i in range(2, N+1):
        factorial *= i
        
    for reN in reversed(range(2, N+1)):
        factorial //= reN
        cnt += (ss.index(s[0]) - ss.index(min(s))) * factorial + 1
        ss.pop(0)
        s.pop(0)
        
        print("{} {}".format(reN, cnt))
    print(cnt)
    return cnt
    

def main():
    N = int(input())
    p_n = list(map(int, input().split()))
    q_n = list(map(int, input().split()))
    
    print(abs(dic_num(N, p_n) - dic_num(N, q_n)))

if __name__ == "__main__":
    main()

Fixed submission:
from itertools import permutations

def num(a_n, c):
    a_n_number = 0
    for i in range(len(a_n)):
        now = a_n[i]
        cnt= 0
        for k in range(i+1, len(a_n)):
            if a_n[k] <  now:
                cnt += 1
        
        a_n_number += c[i] * cnt
    
    return a_n_number


def main():
    n = int(input())
    p_n = list(map(int,input().split()))
    q_n = list(map(int,input().split()))
    c = [1]
    for i in range(n-1):
        c = [c[0]*(i+1)] + c
        
    p_n_num = num(p_n, c)
    q_n_num = num(q_n, c)
    
    print(abs(p_n_num - q_n_num))
        
    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def main():
    n, m, *a_n = map(int, open(0).read().split())
    a_n_half = list(map(lambda x: x // 2, a_n))
    a_n_lcm = lcm(a_n_half)
    
    cnt = m // a_n_lcm
    
    if cnt % 2 == 0:
        print(cnt // 2)
    else:
        print(cnt // 2 + 1)
        
    
if __name__ == "__main__":
    main()

Fixed submission:
from fractions import gcd
from functools import reduce
import copy
import sys

N, M, *a_n = map(int, open(0).read().split())
a_n = list(set(a_n))
a_n = [a // 2 for a in a_n]
N = len(a_n)

def lcm_base(x, y):
    return (x * y) //  gcd(x, y)

def lcm_list(a_n):
    return reduce(lcm_base, a_n)

a_n_half = [0] * N
a_n_copy = copy.copy(a_n)
for i in range(N):
    while a_n_copy[i] % 2 == 0:
        a_n_copy[i] //= 2
        a_n_half[i] += 1
        
for i in range(N-1):
    if a_n_half[i] != a_n_half[i+1]:
        print(0)
        sys.exit()
        
print(-(-(M // lcm_list(a_n)) // 2))

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def main():
    n, m, *a_n = map(int, open(0).read().split())
    a_n_half = list(map(lambda x: x // 2, a_n))
    a_n_lcm = lcm(a_n_half)
    
    cnt = m // a_n_lcm
    
    if cnt % 2 == 0:
        print(cnt // 2)
    else:
        print(cnt // 2 + 1)
        
        
    
    
if __name__ == "__main__":
    main()

Fixed submission:
from fractions import gcd
from functools import reduce
import copy
import sys

N, M, *a_n = map(int, open(0).read().split())
a_n = list(set(a_n))
a_n = [a // 2 for a in a_n]
N = len(a_n)

def lcm_base(x, y):
    return (x * y) //  gcd(x, y)

def lcm_list(a_n):
    return reduce(lcm_base, a_n)

a_n_half = [0] * N
a_n_copy = copy.copy(a_n)
for i in range(N):
    while a_n_copy[i] % 2 == 0:
        a_n_copy[i] //= 2
        a_n_half[i] += 1
        
for i in range(N-1):
    if a_n_half[i] != a_n_half[i+1]:
        print(0)
        sys.exit()
        
print(-(-(M // lcm_list(a_n)) // 2))
Buggy python submission (verdict: Time Limit Exceeded):
import math

X = int(input())
X_sqrt = int(math.sqrt(X))

flag = 0
while flag == 0:
  if X >= 10**5 + 3:
    print("big")
    break
    
  flag = 1
  for i in range(2, X_sqrt):
    if X % i == 0:
      flag = 0
      break
  
  if flag == 1:
    print(X)
    break

Fixed submission:
import math

X = int(input())

flag = 1
while True:
  i = 2
  flag = 1
  while i * i <=  X:
    if X % i == 0:
      flag = 0
      break
    i += 1
  
  if flag == 1:
    print(X)
    break
    
  X += 1

Buggy python submission (verdict: Time Limit Exceeded):
import math

X = int(input())
X_sqrt = int(math.sqrt(X))

flag = 0
while flag == 0:
  if X >= 10**6:
    print("big")
    break
    
  flag = 1
  for i in range(2, X_sqrt):
    if X % i == 0:
      flag = 0
      break
  
  if flag == 1:
    print(X)
    break

Fixed submission:
import math

X = int(input())

flag = 1
while True:
  i = 2
  flag = 1
  while i * i <=  X:
    if X % i == 0:
      flag = 0
      break
    i += 1
  
  if flag == 1:
    print(X)
    break
    
  X += 1
Buggy python submission (verdict: Runtime Error):
print(int(input() ** 2))

Fixed submission:
print(int(input()) ** 2)

Buggy python submission (verdict: Runtime Error):
print(int(input() ** 2)

Fixed submission:
print(int(input()) ** 2)
Buggy python submission (verdict: Runtime Error):

flag = 'No'
for i in range(2,10):
    if n % i == 0:
        if n // i < 10:
            flag = 'Yes'
            break
        else:
            continue
        
if n == 0:
    flag = 'No'

print(flag)

Fixed submission:
n = int(input())

flag = 'No'
for i in range(1,10):
    if n % i == 0:
        if n // i < 10:
            flag = 'Yes'
            break
        else:
            continue

print(flag)
Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())

factor_a = 0
for i in reversed(range(1, int(np.sqrt(n)))):
    if n % i == 0:
       factor_a = i
       break

factor_b = n // factor_a

print(factor_a - 1 + factor_b - 1)

Fixed submission:
import numpy as np
n = int(input())

factor_a = 0
for i in range(1, int(np.sqrt(n)) + 1):
    if n % i == 0:
       factor_a = i
       
factor_b = n // factor_a

#print(factor_a)
#print(num, factor_b)
print(factor_a - 1 + factor_b - 1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = [int(i) for i in input().split()]

ans = 0
for i in range(n - 2):
    for j in range(i + 1, n - 1):
        for k in range(j + 1, n):
            if l[j] + l[k] <= l[i]:
                continue
            elif l[i] + l[j] <= l[k]:
                continue
            elif l[k] + l[i] <= l[j]:
                continue
            
            ans += 1

print(ans)

Fixed submission:
import bisect
n = int(input())
l = [int(x) for x in input().split()]

l.sort()

ans = 0
for a in range(n):
    for b in range(a + 1, n):
        c = bisect.bisect_left(l, l[a] + l[b])
        if b < c:
            ans += c - (b + 1)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a, b, c, d = map(int, input().split())

num = b - a + 1
c_num = b // c - (a - 1) // c
d_num = b // d - (a - 1) // d

cd_max = max(c, d)
cd_min = min(c, d)
i = 1
while True:
    if (cd_max * i) % cd_min == 0:
        cd = cd_max * i
        break
    i += 1
    
cd_num = b // cd - (a - 1) // cd

#print(num, c_num, d_num, cd_num)

print(num - (c_num + d_num - cd_num))


Fixed submission:
a, b, c, d = map(int, input().split())

big = max(c, d)
small = min(c, d)
lcm = 0
for i in range(1, 10 ** 8):
    surplus = big % small
    if surplus == 0:
        lcm = c * d // small
        break
    
    big = small
    small = surplus
    

c_num = b // c - (a - 1) // c
d_num = b // d - (a - 1) // d
cd_num = b // lcm - (a - 1) // lcm
num = b - a + 1

#print(num, c_num, d_num, cd_num, lcm)
ans = num - (c_num + d_num - cd_num)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
red, green, blue, n = map(int, input().split())

ans = 0
for i in range(n // red + 1):
    for j in range(n // blue + 1):
        k = n - red * i - blue * j
        
        if k % green != 0 or k < 0:
            continue
        
        ans += 1

print(ans)

Fixed submission:
red, green, blue, n = map(int, input().split())

ans = 0
for i in range(n // red + 1):
    for j in range(n // blue + 1):
        k = n - red * i - blue * j
        
        if k % green != 0 or k < 0:
            continue
        
        ans += 1

print(ans)