#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  if (k == n) {
    for (long long i = 0; i < n; i++) cout << 0;
    cout << "\n";
    exit(0);
  }
  long long rep = (n - k) / 2;
  string a = "";
  for (long long i = 0; i < rep; i++) a += "0";
  a += "1";
  string s = "";
  while (s.length() < n) {
    s += a;
  }
  cout << s.substr(0, n) << "\n";
  return 0;
}
