time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
You're given a row with nn chairs. We call a seating of people "maximal" if the two following conditions hold:
- There are no neighbors adjacent to anyone seated.
- It's impossible to seat one more person without violating the first rule.
The seating is given as a string consisting of zeros and ones (00 means that the corresponding seat is empty, 11 — occupied). The goal is to determine whether this seating is "maximal".
Note that the first and last seats are not adjacent (if n≠2n≠2).
Input
The first line contains a single integer nn (1≤n≤10001≤n≤1000) — the number of chairs.
The next line co