#include <bits/stdc++.h>
using namespace std;
struct Trie {
  struct Node {
    int child[2];
    int sum;
    Node() {
      sum = 0;
      memset(child, -1, sizeof(child));
    }
  };
  vector<Node> nodes;
  Trie() { nodes.push_back(Node()); }
  void insert(string s) {
    int v = 0;
    for (char c : s) {
      nodes[v].sum++;
      int p = c - '0';
      if ((nodes[v].child[p]) == -1) {
        (nodes[v].child[p]) = nodes.size();
        nodes.push_back(Node());
      }
      v = (nodes[v].child[p]);
    }
    nodes[v].sum++;
  }
  void insertAll(string s) {
    for (int i = 0; i < s.size(); ++i) insert(s.substr(i));
  }
  void print(int u = 0, int lvl = 0, int lim = 2) {
    if (u == -1) return;
    print((nodes[u].child[0]), lvl + 1);
    cout << string(lvl * 2, ' ') << nodes[u].sum << endl;
    print((nodes[u].child[1]), lvl + 1, lim);
  }
  void printPath(const string &s, int doMore = 1, int u = 0, int lvl = 0) {
    if (u == -1) return;
    int p = lvl < s.size() ? s[lvl] - '0' : -1;
    cout << string(lvl * 2, ' ') << nodes[u].sum << endl;
    if (doMore) {
      printPath(s, p == 0, (nodes[u].child[0]), lvl + 1);
      printPath(s, p == 1, (nodes[u].child[1]), lvl + 1);
    }
  }
};
struct Fibo {
  string pre, suf;
  long long sz;
  Fibo(const string &s) {
    pre = s;
    suf = s;
    sz = s.size();
  }
  Fibo operator+(const Fibo &o) const {
    Fibo r("");
    r.sz = sz + o.sz;
    r.pre = (pre + o.pre);
    r.suf = (suf + o.suf);
    if (r.pre.size() > 220) r.pre = r.pre.substr(0, 220);
    if (r.suf.size() > 220) r.suf = r.suf.substr(r.suf.size() - 220);
    if (r.sz >= 4000000000000000000LL) r.sz = 4000000000000000000LL;
    return r;
  }
};
pair<long long, long long> countWith(string s, int N,
                                     const vector<Fibo> &fibos) {
  vector<vector<pair<long long, long long>>> P(
      max(N, 2), vector<pair<long long, long long>>(
                     s.size() + 1, pair<long long, long long>(0, 0)));
  P[0][0].first = 1;
  P[1][0].second = 1;
  for (int i = 2; i < N; ++i) {
    string suf = fibos[i - 2].suf;
    string pre = fibos[i - 1].pre;
    P[i] = P[i - 1];
    P[i][s.size()].first = min(4000000000000000000LL,
                               P[i][s.size()].first + P[i - 2][s.size()].first);
    P[i][s.size()].second =
        min(4000000000000000000LL,
            P[i][s.size()].second + P[i - 2][s.size()].second);
    for (int sz = 0; sz < suf.size(); ++sz) {
      string rsuf = suf.substr(sz);
      int p = 0;
      while (p < s.size() && p < rsuf.size() && s[p] == rsuf[p]) p++;
      if (p < suf.size() - sz) continue;
      rsuf += pre;
      while (p < s.size() && p < rsuf.size() && s[p] == rsuf[p]) p++;
      if (p != rsuf.size()) {
        pair<long long, long long> &t = P[i][p];
        long long &d = (rsuf[p] == '0' ? t.first : t.second);
        d = min(d + 1, 4000000000000000000LL);
      }
    }
  }
  return P[N - 1][s.size()];
}
string findKth(long long K, int N, const vector<Fibo> &fibos, int ML = 200) {
  string s;
  string me = fibos[N - 1].suf;
  while (K > 0 && s.size() < ML) {
    pair<long long, long long> cn = countWith(s, N, fibos);
    if (s.size() && me.substr(me.size() - s.size()) == s) {
      K--;
      if (K == 0) break;
    }
    if (K <= cn.first) {
      s += "0";
    } else {
      K -= cn.first;
      s += "1";
    }
  }
  return s;
}
int main() {
  vector<Fibo> fibos;
  Fibo a("0");
  Fibo b("1");
  fibos.push_back(a);
  fibos.push_back(b);
  int N = 210;
  for (int i = 3; i <= N; ++i) {
    Fibo c = a + b;
    a = b;
    b = c;
    fibos.push_back(c);
  }
  long long K, M;
  cin >> N >> K >> M;
  cout << findKth(K, N + 1, fibos, M) << endl;
}
