#include <bits/stdc++.h>
using namespace std;
int n, k;
string s;
int main() {
  cin >> n >> k;
  for (int i = 0; i < (n - k) / 2; ++i) s += "1";
  s += "0";
  for (int i = 0; i < n; ++i) {
    cout << s[i % s.length()];
  }
  return 0;
}
