#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6;
const int INF = 0x3f3f3f3f;
const long long LLINF = 0x3f3f3f3f3f3f3f3f;
const int maxn = (int)1e5 + 17;
const int mod = (int)1e9 + 7;
int n, m, t, kase, k;
int a[maxn], b[maxn];
int main() {
  kase = 1;
  while (~scanf("%d %d", &n, &m)) {
    string s;
    for (int i = 0; i < (n - m) / 2; ++i) {
      s += "0";
    }
    s += "1";
    for (int i = 0; i < n; ++i) cout << s[i % s.length()];
    cout << "\n";
  }
  return 0;
}
