#include <bits/stdc++.h>
#define rep(i, start, end) for (int i = start; i <= end; i++)
using namespace std;
signed main() {
int n, m, cnt = 0;
cin >> n;
vector<int> a(n + 2);
rep(i, 1, n) cin >> a[i];
cin >> m;
rep(i, 1, n) cnt += (!(a[i] || a[i - 1] || a[i + 1]) ? a[i] = 1, 1 : 0);
puts(cnt >= m ? "true" : "false");
return 0;
}

京公网安备 11010502036488号