#include #include #include #include #include #include #include #include #include #include #include #include #include #include typedef int64_t ll; typedef std::pair Pii; typedef std::pair Pll; typedef std::pair Pdd; #define rip(i, n, _s) for (int i = (_s);i < (int)( n ); i++) #define all(_l) _l.begin(), _l.end() #define rall(_l) _l.rbegin(), _l.rend() #define MM << " " << template using MaxHeap = std::priority_queue; template using MinHeap = std::priority_queue, std::greater>; template inline bool chmax(T &_l, const T b) { if (_l < b) { _l = b; return true; } return false; } template inline bool chmin(T &_l, const T b) { if (_l > b) { _l = b; return true; } return false; } # ifdef LOCAL_DEBUG template void vdeb(const std::vector &bb) { for (unsigned int i = 0;i < bb.size();i++) { if (i == bb.size() - 1) std::cout << bb[i]; else std::cout << bb[i] << ' '; } std::cout << '\n'; } template void vdeb(const std::vector> &bb) { for (unsigned int i = 0;i < bb.size();i++) { std::cout << i << ' '; vdeb(bb[i]); } std::cout << '\n'; } # endif long long pow(long long n, long long p, long long k) {//n^k(mod p) if (!k) return 1; long long a = pow(n,p, k>>1); a = a * a%p; if (k & 1) a = a * n%p; return a; } void euclid(long long &a, long long &b, long long p) { // a>=b A*b+B*(a-a/b*b)=1 if (a == 1) { a = 1; } else { long long A = b, B = a % b; euclid(A, B, p); b = (A - (p + a / b) % p * B % p + p) % p; a = B; } } long long rev(long long n, long long p) {// n*x-p*y=1 //long long q = p; //euclid(p, n, p); //return n % q; return pow(n,p,p-2); } long long bino(long long n, long long m, long long p) {//nCm(mod p) long long ans = 1, div = 1; for(int i = 0;i < m; i++){ ans = (n - i) * ans % p; div = div * (i +1) % p; } return ans * rev(div, p) % p; } struct modint { long long num; long long p; modint() { num = 0; p = 998244353; } modint(long long x) { p = 998244353; num = x % p; } modint inv()const{return rev(num, p);} modint operator-() const{return modint(p-num);} modint& operator+=(const modint &other){ num = (num + other.num) % p; return *this; } modint& operator-=(const modint &other){ num = (num - other.num + p) % p; return *this; } modint& operator*=(const modint &other){ num = (num * other.num) % p; return *this; } modint& operator/=(const modint &other){ (*this) *= other.inv(); return *this; } modint& operator+=(const long long &other){ num = (num + other) % p; return *this; } modint& operator-=(const long long &other){ num = (num - other + p) % p; return *this; } modint& operator*=(const long long &other){ num = (num * other) % p; return *this; } modint& operator/=(const long long &other){ (*this) *= rev(other, p); return *this; } modint& operator++(){return *this += 1;} modint& operator--(){return *this -= 1;} modint& operator=(const long long &other){return (*this) = modint(other);} modint operator+(const modint &other) const{return modint(*this) += other;} modint operator-(const modint &other) const{return modint(*this) -= other;} modint operator*(const modint &other) const{return modint(*this) *= other;} modint operator/(const modint &other) const{return modint(*this) /= other;} modint operator+(const long long &other) const{return modint(*this) += other;} modint operator-(const long long &other) const{return modint(*this) -= other;} modint operator*(const long long &other) const{return modint(*this) *= other;} modint operator/(const long long &other) const{return modint(*this) /= other;} bool operator==(const modint &other) const{return num == other.num;} }; std::istream& operator>>(std::istream &is, const modint x) { std::cin >> x.num; return is; } std::ostream& operator<<(std::ostream &os, const modint &x){ std::cout << x.num; return os; } using namespace std; int main() { string s = "110100"; int n, k; cin >> n >> k; if(k >= 4) { rip(i,k,0) cout << '0'; n -= k; while(n >= 6) { n-=6; cout << s; } cout << s.substr(0, n) << endl; } else if(k == 1) { if(n == 1) cout << '1' << endl; else if(n == 2) cout << "10" << endl; else cout << -1 << endl; } else if(k == 2) { if(n >= 5) cout << -1 << endl; else { cout << "11"; rip(i,n-k,0) cout << '0'; cout << endl; } } else if(k == 3) { if(n <= 6) { cout << "000"; rip(i,n-k,0) cout << '1'; cout << endl; } else if(n == 7) { cout << "1101000" << endl; } else if(n == 8) { cout << "11101000" << endl; } else { cout << -1 << endl; } } else { assert(0); } }