#include <bits/stdc++.h>
using namespace std;
template <typename tp>
inline void read(tp &x) {
  x = 0;
  char c = getchar();
  int f = 0;
  for (; c < '0' || c > '9'; f |= c == '-', c = getchar())
    ;
  for (; c >= '0' && c <= '9'; x = (x << 3) + (x << 1) + c - '0', c = getchar())
    ;
  if (f) x = -x;
}
int main(void) {
  int n, m;
  read(n);
  read(m);
  int t = (n - m) / 2;
  vector<int> vec;
  for (register int _ = 1; _ <= (t); _++) vec.push_back(0);
  vec.push_back(1);
  for (register int i = 0; i < (int)n; i++) cout << vec[i % (int)vec.size()];
  cout << "\n";
}
