#include <bits/stdc++.h>
const int N = 5e5 + 10, M = 1e7 + 10;
const long long mod = 1e9 + 7;
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) printf("%d", (i % ((n - k) / 2 + 1) > 0));
  cout << endl;
  return 0;
}
