n = int(input()) s = str(input()) allCorrect = 1 count = 0 for i in range(n): if s[i] == 'N': allCorrect = 0 if (i+1)%(n//10) == 0: count += allCorrect allCorrect = 1 print(count)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | n = int(input()) s = str(input()) allCorrect = 1 count = 0 for i in range(n): if s[i] == 'N': allCorrect = 0 if (i+1)%(n//10) == 0: count += allCorrect allCorrect = 1 print(count) |