#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  int p = (n - k) / 2 + 1;
  string period = string(p - 1, '0') + '1';
  for (int i = 0; i < n; ++i) {
    cout << period[i % p];
  }
  cout << endl;
}
