Жишээ тэстүүд

Оролт
4
1 3 2 0
Гаралт
2
Оролт
7
1 3 3 2 1 2 3
Гаралт
0
Оролт
2
2 2
Гаралт
1

Тэмдэглэл

In the first test Vasya can write the contest on the day number 1 and do sport on the day number 3. Thus, he will have a rest for only 2 days.

In the second test Vasya should write contests on days number 1, 3, 5 and 7, in other days do sport. Thus, he will not have a rest for a single day.

In the third test Vasya can do sport either on a day number 1 or number 2. He can not do sport in two days, because it will be contrary to the his limitation. Thus, he will have a rest for only one day.