#include <iostream> #include <algorithm> #include <iomanip> #include <vector> #include <queue> #include <set> #include <map> #include <cassert> #define debug_value(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << #x << "=" << x << endl; #define debug(x) cerr << "line" << __LINE__ << ":<" << __func__ << ">:" << x << endl; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } using namespace std; typedef long long ll; int max_pan(string s){ int ans = 1; int n = s.size(); for(int c = 0; c < n; c++){ for(int l = 1; c-l >= 0 && c+l < n; l++){ if(s[c-l] != s[c+l]) break; chmax(ans, l*2+1); } for(int l = 1; c-l >= 0 && c+l-1 < n; l++){ if(s[c-l] != s[c+l-1]) break; chmax(ans, l*2); } } return ans; } void solve_small(int n, int k){ set<int> st; for(int i = 0; i < (1<<n); i++){ string s; for(int j = 0; j < n; j++){ if(i&(1<<j)) s += '1'; else s += '0'; } // cout << s << ' ' << max_pan(s) << endl; if(max_pan(s) == k){ cout << s << endl; return; } } cout << -1 << endl; } int main(){ ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(10) << fixed; int n, k; cin >> n >> k; // test(); if(n <= 10){ solve_small(n, k); return 0; } if(k <= 3){ cout << -1 << endl; return 0; } string t = "1"; for(int i = 2; i <= k-1; i++) t += "0"; t += "1"; t += "01"; string ans; while(ans.size() < n) ans += t; while(ans.size() > n) ans.pop_back(); cout << ans << endl; // cout << max_pan(ans) << endl; }