#include using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) #define repr(i, n) for (int i = (n) - 1; i >= 0; i--) #define repe(i, l, r) for (int i = (l); i < (r); i++) #define reper(i, l, r) for (int i = (r) - 1; i >= (l); i--) #define repi(i, l, r) for (int i = (l); i <= (r); i++) #define repir(i, l, r) for (int i = (r); i >= (l); i--) #define range(a) a.begin(), a.end() void initio() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); } int main() { ll N, X; cin >> N >> X; vector A(N); rep(i, N) cin >> A[i]; ll p = 1; rep(i, N) { p *= A[i] + 1; if (p - 1 > X) { cout << string(X, '0') << endl; return 0; } } if (count(range(A), 1) > 0 && N >= 2) { string ans(X, '0'); for (int i = p - 1; i <= X; i++) { ans[i - 1] = '1'; } cout << ans << endl; } else { abort(); } }