# This problem seems easy, but I don’t know if there is a good solution

Occasional Visitor

# This problem seems easy, but I don’t know if there is a good solution

This problem occurred in the factory.
The number 1 means that the machine is running, and the number 0 means that the machine is stopped. I want to know how many times the machine has stopped, but I can’t just count the times of 0, because between 1 and the next 1, all 0 It only counts once, how can I calculate the problem of how many times the machine has stopped .

The example is as follows :
1 , 1 , 1 , 0 , 0 , 0 , 1 , 1, 0 , 0,  0 , 0,  0 , 0,  0 , 0,  1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 1 , 1 , 1 , 0 , , 0,  0 , 0,  0 , 1 , 1 ,
0 , 0 , 1 , 0 , 1  , 0,  0 , 0, 1, 1 , 0