You are viewing a single comment's thread. Return to all comments →
input() s = input().replace(' ', '') print(sum(x // 2 + 1 for x in map(len, s.split('1'))) - 1)
Seems like cookies are disabled on this browser, please enable them to open this website
Jumping on the Clouds
You are viewing a single comment's thread. Return to all comments →