Bessie has spilled her collection of N (1 <= N <= 80) blue and orange cowbeads (represented as 1s and 0s, respectively, in the human world) on the floor. She cleans up the mess by arranging the beads into a long line. She then counts the number of times a blue bead is next to an orange bead and vice versa, but is not sure if she is correct. Write a program to validate Bessie's count.
输入描述:
* Line 1: A single integer: N
* Line 2: Line 2 contains N integers, each of which is 0 or 1
输出描述:
* Line 1: A single integer describing the number of occurrences that a blue bead is next to an orange bead and vice versa.