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