#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
template <typename T, typename S>
ostream &operator<<(ostream &os, pair<T, S> a) {
  os << '(' << a.first << ',' << a.second << ')';
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> v) {
  for (auto x : v) os << x << ' ';
  return os;
}
void debug() { cerr << '\n'; }
template <typename H, typename... T>
void debug(H a, T... b) {
  cerr << a;
  if (sizeof...(b)) cerr << ", ";
  debug(b...);
}
int check(string &s) {
  int n = (int)s.size();
  for (int i = 1; i <= n; i++) {
    map<string, int> mp;
    for (int j = 0; j < n + 1 - i; j++) {
      mp[s.substr(j, i)]++;
    }
    for (auto x : mp) {
      if (x.second == 1) return i;
    }
  }
  return n;
}
int main() {
  int N = 4;
  for (int i = 0; i < 1 << N; i++) {
    string s;
    for (int j = 0; j < N; j++) {
      s += '0' + (i >> j & 1);
    }
  }
  int n, k;
  cin >> n >> k;
  string s;
  int num = (n - k) / 2;
  string t;
  for (int i = 0; i < (int)(num); ++i) t += '0';
  while (s.size() < n) {
    s += t;
    s += '1';
  }
  cout << s.substr(0, n) << endl;
}
