fork download
  1. count = 0
  2. n = int(input())
  3. l = list()
  4. for i in range (n):
  5. l.append(input())
  6. for j in range (len(l)):
  7. if type(l[j]) == str:
  8. if l[j][0] == '(' and l[j][-1] == ')':
  9. break
  10. else:
  11. count += 1
  12. else:
  13. count += 1
  14.  
  15. print (count)
  16.  
Success #stdin #stdout 0.04s 9812KB
stdin
4
b
kj
(a,3)
man
stdout
2