CF1077B Disturbed People

题目描述

对于一个给定的长度为$n$的$01$序列$a_1,a_2,\cdots,a_n$ 如果存在$1

输入格式

第一行一个整数$n(3\leq n\leq100)$ 第二行$n$个整数$a_1,a_2,\cdots,a_n(a_i\in{0,1})$表示给定序列

输出格式

输出一个整数表示答案

说明/提示

In the first example people from flats $ 2 $ and $ 7 $ or $ 4 $ and $ 7 $ can turn off the light and nobody will be disturbed. It can be shown that there is no better answer in this example. There are no disturbed people in second and third examples.