#include<bits/stdc++.h>
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	int temp=m;
	string str="";
	if((m>=(n-1))&&(m<=(2*(n+1)))){
	    if(m==n-1){
	        for(int i=0;i<n-1;i++){
	            str=str+"01";
	            i++;
	        }
	        str=str+"0";
	    }
	    else if(m==n){
	        for(int i=0;i<m;i++){
	            str=str+"10";
	        }
	    }
	    else if(m==n+1){
	        for(int i=0;i<n;i++){
	            str=str+"10";
	        }
	        str=str+"1";
	    }
	    else if(m>2*n){
	        int temp=m-n-1;
	        m=m;
	        n=n;
	        while(n>0){
	            str=str+"110";
	            m-=2;
	            n--;
	            temp--;
	           // cout<<m<<" l1 "<<n<<" "<<str<<endl;
	        }
	       // cout<<m<<" "<<n<<endl;
	       // cout<<m<<" "<<n<<endl;
	        while(m>0){
	            str=str+"1";
	            m--;
	        }
	    }
	    else{
	        int temp=m-n-1;
	        m=m;
	        n=n;
	        while(temp>0){
	            str=str+"110";
	            m-=2;
	            n--;
	            temp--;
	           // cout<<m<<" l1 "<<n<<" "<<str<<endl;
	        }
	       // cout<<m<<" "<<n<<endl;
	        for(int i=0;i<n;i++){
	            str=str+"10";
	            n--;
	            m--;
	            i++;
	        }
	       // cout<<m<<" "<<n<<endl;
	        while(m>0){
	            str=str+"1";
	            m--;
	        }

	    }
	    cout<<str;
	}
	else{
	    cout<<-1<<endl;
	}
}


#include<bits/stdc++.h>
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	int temp=m;
	string str="";
	if((m>=(n-1))&&(m<=(2*(n+1)))){
	    if(m==n-1){
	        for(int i=0;i<n-1;i++){
	            str=str+"01";
	            i++;
	        }
	        str=str+"0";
	    }
	    else if(m==n){
	        for(int i=0;i<m;i++){
	            str=str+"10";
	        }
	    }
	    else if(m==n+1){
	        for(int i=0;i<n;i++){
	            str=str+"10";
	        }
	        str=str+"1";
	    }
	    else if(m>2*n){
	        int temp=m-n-1;
	        m=m;
	        n=n;
	        while(n>0){
	            str=str+"110";
	            m-=2;
	            n--;
	            temp--;
	           // cout<<m<<" l1 "<<n<<" "<<str<<endl;
	        }
	       // cout<<m<<" "<<n<<endl;
	       // cout<<m<<" "<<n<<endl;
	        while(m>0){
	            str=str+"1";
	            m--;
	        }
	    }
	    else{
	        int temp=m-n-1;
	        m=m;
	        n=n;
	        while(temp>0){
	            str=str+"110";
	            m-=2;
	            n--;
	            temp--;
	           // cout<<m<<" l1 "<<n<<" "<<str<<endl;
	        }
	       // cout<<m<<" "<<n<<endl;
	       int tempn=n;
	        for(int i=0;i<tempn;i++){
	            str=str+"10";
	            n--;
	            m--;
	        }
	       // cout<<m<<" "<<n<<endl;
	        while(m>0){
	            str=str+"1";
	            m--;
	        }

	    }
	    cout<<str;
	}
	else{
	    cout<<-1<<endl;
	}
}


#include<bits/stdc++.h>
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	int temp=m;
	string str="";
	if((m>=(n-1))&&(m<=(2*(n+1)))){
	    if(m==n-1){
	        for(int i=0;i<n-1;i++){
	            str=str+"01";
	            i++;
	        }
	        str=str+"0";
	    }
	    else if(m==n){
	        for(int i=0;i<m;i++){
	            str=str+"10";
	        }
	    }
	    else if(m==n+1){
	        for(int i=0;i<n;i++){
	            str=str+"10";
	        }
	        str=str+"1";
	    }
	    else if(m>2*n){
	        int temp=m-n-1;
	        m=m;
	        n=n;
	        while(n>0){
	            str=str+"110";
	            m-=2;
	            n--;
	            temp--;
	           // cout<<m<<" l1 "<<n<<" "<<str<<endl;
	        }
	       // cout<<m<<" "<<n<<endl;
	       // cout<<m<<" "<<n<<endl;
	        while(m>0){
	            str=str+"1";
	            m--;
	        }
	    }
	    else{
	        int temp=m-n-1;
	        m=m;
	        n=n;
	        while(temp>0){
	            str=str+"110";
	            m-=2;
	            n--;
	            temp--;
	           // cout<<m<<" l1 "<<n<<" "<<str<<endl;
	        }
	       // cout<<m<<" "<<n<<endl;
	       int tempn=n;
	        for(int i=0;i<tempn;i++){
	            str=str+"10";
	            n--;
	            m--;
	            i++;
	        }
	       // cout<<m<<" "<<n<<endl;
	        while(m>0){
	            str=str+"1";
	            m--;
	        }

	    }
	    cout<<str;
	}
	else{
	    cout<<-1<<endl;
	}
}


#include<bits/stdc++.h>
#include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int n,m;
	cin>>n>>m;
	int temp=m;
	string str="";
	if((m>=(n-1))&&(m<=(2*(n+1)))){
	    if(m==n-1){
	        for(int i=0;i<m-1;i++){
	            str=str+"01";
	            i++;
	        }
	        str=str+"0";
	    }
	    else if(m==n){
	        for(int i=0;i<m-1;i++){
	            str=str+"10";
	            i++;
	        }
	    }
	    else if(m==n+1){
	        for(int i=0;i<m-1;i++){
	            str=str+"10";
	            i++;
	        }
	        str=str+"1";
	    }
	    else if(m>2*n){
	        int temp=m-n-1;
	        m=m;
	        n=n;
	        while(n>0){
	            str=str+"110";
	            m-=2;
	            n--;
	            temp--;
	            cout<<m<<" l1 "<<n<<" "<<str<<endl;
	        }
	        cout<<m<<" "<<n<<endl;
	        cout<<m<<" "<<n<<endl;
	        while(m>0){
	            str=str+"1";
	            m--;
	        }
	    }
	    else{
	        int temp=m-n-1;
	        m=m;
	        n=n;
	        while(temp>0){
	            str=str+"110";
	            m-=2;
	            n--;
	            temp--;
	            cout<<m<<" l1 "<<n<<" "<<str<<endl;
	        }
	        cout<<m<<" "<<n<<endl;
	        for(int i=0;i<n;i++){
	            str=str+"10";
	            n--;
	            m--;
	            i++;
	        }
	        cout<<m<<" "<<n<<endl;
	        while(m>0){
	            str=str+"1";
	            m--;
	        }

	    }
	    cout<<str;
	}
	else{
	    cout<<-1<<endl;
	}
}


#include <bits/stdc++.h>

using namespace std;

#define DEBUG

template <typename T1, typename T2>
inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p)
{
    return os << "(" << p.first << ", " << p.second << ")";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::vector<T>& v)
{
    bool first = true;
    os << "[";
    for(unsigned int i = 0; i < v.size(); i++)
    {
        if(!first)
            os << ", ";
        os << v[i];
        first = false;
    }
    return os << "]";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::set<T>& v)
{
    bool first = true;
    os << "[";
    for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii;
        first = false;
    }
    return os << "]";
}

template<typename T1, typename T2>
inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v)
{
    bool first = true;
    os << "[";
    for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii ;
        first = false;
    }
    return os << "]";
}

struct debugger
{
	bool first;

	debugger() {
		first = true;
	}

    template<typename T> debugger& operator , (const T& v)
    {
    	if (!first) cout << ", ";
        cout << v;
        first = false;
        return *this;
    }
};

// Debug macro that prints out "expression: value" for clarity
#ifdef DEBUG
    #define debug(args...)          { cout << #args << ": "; (debugger()), args; cout << endl; }
#else
    #define debug(args...)
#endif

#define int long long

// Union-Find Disjoint-Sets data structure with path compresion and efficient union
// class UnionFind {
//     private:
//         vector<int> p, rank;
//     UnionFind(int n) {
//         rank.assign(n, 0);
//         for (int i = 0; i < n; i++) {
//             p[i] = i;
//         }
//     }
//     int findSet(int i) {
//         return (p[i] == i) : i ? (p[i] = findSet(i));
//     }
//     int unionSet(int i, int j) {
//         int x = findSet(i), y = findSet(j);
//         if (x != y) {
//             if (rank[x] < rank[y]) p[x] = y;
//             else {
//                 p[y] = x;
//                 if (rank[x] == rank[y]) rank[y]++;
//             }
//         }
//     }
// }

int32_t main(void) {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n, m; cin >> n >> m;
    if (n > m || n * 2 + 2 < m) cout << -1 << endl;
    else {
        while (m - n >= 1 && n && m) {
            cout << 110;
            m -= 2; n--;
        }
        if (n == 0 && m == 1) cout << 1 << endl;
        else if (n == 0 && m == 2) cout << 11 << endl;
        else {
            while (n && m) {
                cout << 10;
                m -= 1; n--;
            }
        }
        if (n == 0 && m == 1) cout << 1 << endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

#define DEBUG

template <typename T1, typename T2>
inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p)
{
    return os << "(" << p.first << ", " << p.second << ")";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::vector<T>& v)
{
    bool first = true;
    os << "[";
    for(unsigned int i = 0; i < v.size(); i++)
    {
        if(!first)
            os << ", ";
        os << v[i];
        first = false;
    }
    return os << "]";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::set<T>& v)
{
    bool first = true;
    os << "[";
    for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii;
        first = false;
    }
    return os << "]";
}

template<typename T1, typename T2>
inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v)
{
    bool first = true;
    os << "[";
    for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii ;
        first = false;
    }
    return os << "]";
}

struct debugger
{
	bool first;

	debugger() {
		first = true;
	}

    template<typename T> debugger& operator , (const T& v)
    {
    	if (!first) cout << ", ";
        cout << v;
        first = false;
        return *this;
    }
};

// Debug macro that prints out "expression: value" for clarity
#ifdef DEBUG
    #define debug(args...)          { cout << #args << ": "; (debugger()), args; cout << endl; }
#else
    #define debug(args...)
#endif

#define int long long

// Union-Find Disjoint-Sets data structure with path compresion and efficient union
// class UnionFind {
//     private:
//         vector<int> p, rank;
//     UnionFind(int n) {
//         rank.assign(n, 0);
//         for (int i = 0; i < n; i++) {
//             p[i] = i;
//         }
//     }
//     int findSet(int i) {
//         return (p[i] == i) : i ? (p[i] = findSet(i));
//     }
//     int unionSet(int i, int j) {
//         int x = findSet(i), y = findSet(j);
//         if (x != y) {
//             if (rank[x] < rank[y]) p[x] = y;
//             else {
//                 p[y] = x;
//                 if (rank[x] == rank[y]) rank[y]++;
//             }
//         }
//     }
// }

int32_t main(void) {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n, m; cin >> n >> m;
    if (n - m > 1|| n * 2 + 2 < m) cout << -1 << endl;
    else if (n <= m) {
        while (m - n >= 1 && n && m) {
            cout << 110;
            m -= 2; n--;
        }
        if (n == 0 && m == 1) cout << 1 << endl;
        else if (n == 0 && m == 2) cout << 11 << endl;
        else {
            while (n && m) {
                cout << 10;
                m -= 1; n--;
            }
            if (n == 0 && m == 1) cout << 1 << endl;
        }
    }
    else {
        cout << 0;
        while (m--) cout << 10;
    }
}


#include <bits/stdc++.h>

using namespace std;

#define DEBUG

template <typename T1, typename T2>
inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p)
{
    return os << "(" << p.first << ", " << p.second << ")";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::vector<T>& v)
{
    bool first = true;
    os << "[";
    for(unsigned int i = 0; i < v.size(); i++)
    {
        if(!first)
            os << ", ";
        os << v[i];
        first = false;
    }
    return os << "]";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::set<T>& v)
{
    bool first = true;
    os << "[";
    for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii;
        first = false;
    }
    return os << "]";
}

template<typename T1, typename T2>
inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v)
{
    bool first = true;
    os << "[";
    for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii ;
        first = false;
    }
    return os << "]";
}

struct debugger
{
	bool first;

	debugger() {
		first = true;
	}

    template<typename T> debugger& operator , (const T& v)
    {
    	if (!first) cout << ", ";
        cout << v;
        first = false;
        return *this;
    }
};

// Debug macro that prints out "expression: value" for clarity
#ifdef DEBUG
    #define debug(args...)          { cout << #args << ": "; (debugger()), args; cout << endl; }
#else
    #define debug(args...)
#endif

#define int long long

// Union-Find Disjoint-Sets data structure with path compresion and efficient union
// class UnionFind {
//     private:
//         vector<int> p, rank;
//     UnionFind(int n) {
//         rank.assign(n, 0);
//         for (int i = 0; i < n; i++) {
//             p[i] = i;
//         }
//     }
//     int findSet(int i) {
//         return (p[i] == i) : i ? (p[i] = findSet(i));
//     }
//     int unionSet(int i, int j) {
//         int x = findSet(i), y = findSet(j);
//         if (x != y) {
//             if (rank[x] < rank[y]) p[x] = y;
//             else {
//                 p[y] = x;
//                 if (rank[x] == rank[y]) rank[y]++;
//             }
//         }
//     }
// }

int32_t main(void) {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n, m; cin >> n >> m;
    if (n - m > 1|| n * 2 + 2 < m) cout << -1 << endl;
    else if (n <= m) {
        while (m - n >= 1 && n && m) {
            cout << 110;
            m -= 2; n--;
        }
        if (n == 0 && m == 1) cout << 1 << endl;
        else if (n == 0 && m == 2) cout << 11 << endl;
        else {
            while (n && m) {
                cout << 10;
                m -= 1; n--;
            }
        }
        if (n == 0 && m == 1) cout << 1 << endl;
    }
    else {
        cout << 0;
        while (n--) cout << 10;
    }
}


#include <bits/stdc++.h>

using namespace std;

#define DEBUG

template <typename T1, typename T2>
inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p)
{
    return os << "(" << p.first << ", " << p.second << ")";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::vector<T>& v)
{
    bool first = true;
    os << "[";
    for(unsigned int i = 0; i < v.size(); i++)
    {
        if(!first)
            os << ", ";
        os << v[i];
        first = false;
    }
    return os << "]";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::set<T>& v)
{
    bool first = true;
    os << "[";
    for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii;
        first = false;
    }
    return os << "]";
}

template<typename T1, typename T2>
inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v)
{
    bool first = true;
    os << "[";
    for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii ;
        first = false;
    }
    return os << "]";
}

struct debugger
{
	bool first;

	debugger() {
		first = true;
	}

    template<typename T> debugger& operator , (const T& v)
    {
    	if (!first) cout << ", ";
        cout << v;
        first = false;
        return *this;
    }
};

// Debug macro that prints out "expression: value" for clarity
#ifdef DEBUG
    #define debug(args...)          { cout << #args << ": "; (debugger()), args; cout << endl; }
#else
    #define debug(args...)
#endif

#define int long long

// Union-Find Disjoint-Sets data structure with path compresion and efficient union
// class UnionFind {
//     private:
//         vector<int> p, rank;
//     UnionFind(int n) {
//         rank.assign(n, 0);
//         for (int i = 0; i < n; i++) {
//             p[i] = i;
//         }
//     }
//     int findSet(int i) {
//         return (p[i] == i) : i ? (p[i] = findSet(i));
//     }
//     int unionSet(int i, int j) {
//         int x = findSet(i), y = findSet(j);
//         if (x != y) {
//             if (rank[x] < rank[y]) p[x] = y;
//             else {
//                 p[y] = x;
//                 if (rank[x] == rank[y]) rank[y]++;
//             }
//         }
//     }
// }

int32_t main(void) {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n, m; cin >> n >> m;
    if (m - n * 2 > 2 || n > m) cout << -1 << endl;
    else {
        while (m - n >= 1 && n && m) {
            cout << 110;
            m -= 2; n--;
        }
        if (n == 0 && m == 1) cout << 1 << endl;
        else if (n == 0 && m == 2) cout << 11 << endl;
        else {
            while (n && m) {
                cout << 10;
                m -= 1; n--;
            }
        }
        if (n == 0 && m == 1) cout << 1 << endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

#define DEBUG

template <typename T1, typename T2>
inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p)
{
    return os << "(" << p.first << ", " << p.second << ")";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::vector<T>& v)
{
    bool first = true;
    os << "[";
    for(unsigned int i = 0; i < v.size(); i++)
    {
        if(!first)
            os << ", ";
        os << v[i];
        first = false;
    }
    return os << "]";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::set<T>& v)
{
    bool first = true;
    os << "[";
    for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii;
        first = false;
    }
    return os << "]";
}

template<typename T1, typename T2>
inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v)
{
    bool first = true;
    os << "[";
    for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii ;
        first = false;
    }
    return os << "]";
}

struct debugger
{
	bool first;

	debugger() {
		first = true;
	}

    template<typename T> debugger& operator , (const T& v)
    {
    	if (!first) cout << ", ";
        cout << v;
        first = false;
        return *this;
    }
};

// Debug macro that prints out "expression: value" for clarity
#ifdef DEBUG
    #define debug(args...)          { cout << #args << ": "; (debugger()), args; cout << endl; }
#else
    #define debug(args...)
#endif

#define int long long

// Union-Find Disjoint-Sets data structure with path compresion and efficient union
// class UnionFind {
//     private:
//         vector<int> p, rank;
//     UnionFind(int n) {
//         rank.assign(n, 0);
//         for (int i = 0; i < n; i++) {
//             p[i] = i;
//         }
//     }
//     int findSet(int i) {
//         return (p[i] == i) : i ? (p[i] = findSet(i));
//     }
//     int unionSet(int i, int j) {
//         int x = findSet(i), y = findSet(j);
//         if (x != y) {
//             if (rank[x] < rank[y]) p[x] = y;
//             else {
//                 p[y] = x;
//                 if (rank[x] == rank[y]) rank[y]++;
//             }
//         }
//     }
// }

int32_t main(void) {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n, m; cin >> n >> m;
    if (m - n > 1|| n * 2 + 2 < m) cout << -1 << endl;
    else if (n <= m) {
        while (m - n >= 1 && n && m) {
            cout << 110;
            m -= 2; n--;
        }
        if (n == 0 && m == 1) cout << 1 << endl;
        else if (n == 0 && m == 2) cout << 11 << endl;
        else {
            while (n && m) {
                cout << 10;
                m -= 1; n--;
            }
        }
        if (n == 0 && m == 1) cout << 1 << endl;
    }
    else {
        cout << 0;
        while (n--) cout << 10;
    }
}


#include <bits/stdc++.h>

using namespace std;

#define DEBUG

template <typename T1, typename T2>
inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p)
{
    return os << "(" << p.first << ", " << p.second << ")";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::vector<T>& v)
{
    bool first = true;
    os << "[";
    for(unsigned int i = 0; i < v.size(); i++)
    {
        if(!first)
            os << ", ";
        os << v[i];
        first = false;
    }
    return os << "]";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::set<T>& v)
{
    bool first = true;
    os << "[";
    for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii;
        first = false;
    }
    return os << "]";
}

template<typename T1, typename T2>
inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v)
{
    bool first = true;
    os << "[";
    for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii ;
        first = false;
    }
    return os << "]";
}

struct debugger
{
	bool first;

	debugger() {
		first = true;
	}

    template<typename T> debugger& operator , (const T& v)
    {
    	if (!first) cout << ", ";
        cout << v;
        first = false;
        return *this;
    }
};

// Debug macro that prints out "expression: value" for clarity
#ifdef DEBUG
    #define debug(args...)          { cout << #args << ": "; (debugger()), args; cout << endl; }
#else
    #define debug(args...)
#endif

#define int long long

// Union-Find Disjoint-Sets data structure with path compresion and efficient union
// class UnionFind {
//     private:
//         vector<int> p, rank;
//     UnionFind(int n) {
//         rank.assign(n, 0);
//         for (int i = 0; i < n; i++) {
//             p[i] = i;
//         }
//     }
//     int findSet(int i) {
//         return (p[i] == i) : i ? (p[i] = findSet(i));
//     }
//     int unionSet(int i, int j) {
//         int x = findSet(i), y = findSet(j);
//         if (x != y) {
//             if (rank[x] < rank[y]) p[x] = y;
//             else {
//                 p[y] = x;
//                 if (rank[x] == rank[y]) rank[y]++;
//             }
//         }
//     }
// }

int32_t main(void) {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n, m; cin >> n >> m;
    if (n - m > 1|| n * 2 + 2 < m) cout << -1 << endl;
    else if (n <= m) {
        while (m - n >= 1 && n && m) {
            cout << 110;
            m -= 2; n--;
        }
        if (n == 0 && m == 1) cout << 1 << endl;
        else if (n == 0 && m == 2) cout << 11 << endl;
        else {
            while (n && m) {
                cout << 10;
                m -= 1; n--;
            }
        }
        if (n == 0 && m == 1) cout << 1 << endl;
    }
    else {
        cout << 0;
        while (m--) cout << 10;
    }
}


#include <bits/stdc++.h>

using namespace std;

#define DEBUG

template <typename T1, typename T2>
inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p)
{
    return os << "(" << p.first << ", " << p.second << ")";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::vector<T>& v)
{
    bool first = true;
    os << "[";
    for(unsigned int i = 0; i < v.size(); i++)
    {
        if(!first)
            os << ", ";
        os << v[i];
        first = false;
    }
    return os << "]";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::set<T>& v)
{
    bool first = true;
    os << "[";
    for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii;
        first = false;
    }
    return os << "]";
}

template<typename T1, typename T2>
inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v)
{
    bool first = true;
    os << "[";
    for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii ;
        first = false;
    }
    return os << "]";
}

struct debugger
{
	bool first;

	debugger() {
		first = true;
	}

    template<typename T> debugger& operator , (const T& v)
    {
    	if (!first) cout << ", ";
        cout << v;
        first = false;
        return *this;
    }
};

// Debug macro that prints out "expression: value" for clarity
#ifdef DEBUG
    #define debug(args...)          { cout << #args << ": "; (debugger()), args; cout << endl; }
#else
    #define debug(args...)
#endif

#define int long long

// Union-Find Disjoint-Sets data structure with path compresion and efficient union
// class UnionFind {
//     private:
//         vector<int> p, rank;
//     UnionFind(int n) {
//         rank.assign(n, 0);
//         for (int i = 0; i < n; i++) {
//             p[i] = i;
//         }
//     }
//     int findSet(int i) {
//         return (p[i] == i) : i ? (p[i] = findSet(i));
//     }
//     int unionSet(int i, int j) {
//         int x = findSet(i), y = findSet(j);
//         if (x != y) {
//             if (rank[x] < rank[y]) p[x] = y;
//             else {
//                 p[y] = x;
//                 if (rank[x] == rank[y]) rank[y]++;
//             }
//         }
//     }
// }

int32_t main(void) {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n, m; cin >> n >> m;
    if (m - n * 2 > 2 || n > m) cout << -1 << endl;
    else {
        while (m - n >= 2 && n && m) {
            cout << 110;
            m -= 2; n--;
        }
        if (n == 0 && m == 1) cout << 1 << endl;
        else if (n == 0 && m == 2) cout << 11 << endl;
        else {
            while (m - n >= 1 && n && m) {
                cout << 10;
                m -= 1; n--;
            }
        }
        if (n == 0 && m == 1) cout << 1 << endl;
    }
}


#include <bits/stdc++.h>

using namespace std;

#define DEBUG

template <typename T1, typename T2>
inline std::ostream& operator << (std::ostream& os, const std::pair<T1, T2>& p)
{
    return os << "(" << p.first << ", " << p.second << ")";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::vector<T>& v)
{
    bool first = true;
    os << "[";
    for(unsigned int i = 0; i < v.size(); i++)
    {
        if(!first)
            os << ", ";
        os << v[i];
        first = false;
    }
    return os << "]";
}

template<typename T>
inline std::ostream &operator << (std::ostream & os, const std::set<T>& v)
{
    bool first = true;
    os << "[";
    for (typename std::set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii;
        first = false;
    }
    return os << "]";
}

template<typename T1, typename T2>
inline std::ostream &operator << (std::ostream & os, const std::map<T1, T2>& v)
{
    bool first = true;
    os << "[";
    for (typename std::map<T1, T2>::const_iterator ii = v.begin(); ii != v.end(); ++ii)
    {
        if(!first)
            os << ", ";
        os << *ii ;
        first = false;
    }
    return os << "]";
}

struct debugger
{
	bool first;

	debugger() {
		first = true;
	}

    template<typename T> debugger& operator , (const T& v)
    {
    	if (!first) cout << ", ";
        cout << v;
        first = false;
        return *this;
    }
};

// Debug macro that prints out "expression: value" for clarity
#ifdef DEBUG
    #define debug(args...)          { cout << #args << ": "; (debugger()), args; cout << endl; }
#else
    #define debug(args...)
#endif

#define int long long

// Union-Find Disjoint-Sets data structure with path compresion and efficient union
// class UnionFind {
//     private:
//         vector<int> p, rank;
//     UnionFind(int n) {
//         rank.assign(n, 0);
//         for (int i = 0; i < n; i++) {
//             p[i] = i;
//         }
//     }
//     int findSet(int i) {
//         return (p[i] == i) : i ? (p[i] = findSet(i));
//     }
//     int unionSet(int i, int j) {
//         int x = findSet(i), y = findSet(j);
//         if (x != y) {
//             if (rank[x] < rank[y]) p[x] = y;
//             else {
//                 p[y] = x;
//                 if (rank[x] == rank[y]) rank[y]++;
//             }
//         }
//     }
// }

int32_t main(void) {
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n, m; cin >> n >> m;
    if (m - n > 1|| n * 2 + 2 < m) cout << -1 << endl;
    else if (m <= n) {
        while (m - n >= 1 && n && m) {
            cout << 110;
            m -= 2; n--;
        }
        if (n == 0 && m == 1) cout << 1 << endl;
        else if (n == 0 && m == 2) cout << 11 << endl;
        else {
            while (n && m) {
                cout << 10;
                m -= 1; n--;
            }
        }
        if (n == 0 && m == 1) cout << 1 << endl;
    }
    else {
        cout << 0;
        while (n--) cout << 10;
    }
}


#include<bits/stdc++.h>
#define ll long long int
#define pb(i) push_back(i)
#define endl "\n"
#define mod 1000000007
#define eps 10e-9
#define vi vector<int>
#define vli vector<ll>
using namespace std;
int main()
{
	int t=1;
//	cin>>t;

	while(t--)
	{
		ll n,m;
		cin>>n>>m;
		if(2*n+2>=m && n<=m)
		{
			if((m/n)>=2)
			{
				ll arr[3000001];
				memset(arr,-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
			else
			{
				ll xx=m%n;
				ll pp=n-xx;
				ll arr[3000001];
				memset(arr,	-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<xx;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				j=j-1;
				for(ll i=0;i<pp;i++)
				{
					arr[j]=0;
					j++;
					j=j+1;
				}

				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
		}
		else if(n-1==m)
		{
			for(ll i=0;i<n+m;i++)
			{
				if(i%2==0)
				{
					cout<<"0";
				}
				else
				{
					cout<<"1";
				}
			}
			endl;
		}
		else
		{
			cout<<"-1"<<endl;
		 }

	}
}


#include<bits/stdc++.h>
#define ll long long int
#define pb(i) push_back(i)
#define endl "\n"
#define mod 1000000007
#define eps 10e-9
#define vi vector<int>
#define vli vector<ll>
using namespace std;
int main()
{
	int t=1;
//	cin>>t;

	while(t--)
	{
		ll n,m;
		cin>>n>>m;
		if(2*n+2>=m)
		{
			if((m/n)>=2)
			{
				bool arr[n+m];
				memset(arr,true,sizeof(arr));
				int j=2;
				for(int i=0;i<n;i++)
				{
					arr[j]=false;
					j++;
					j=j+2;
				}
				for(ll i=0;i<n+m;i++)
				{
					if(arr[i]==false)
					{
						cout<<"0";
					}
					else
					{
						cout<<"1";
					}
				}
				cout<<endl;
			}
			else
			{
				int xx=m%n;
				bool arr[n+m];
				memset(arr,true,sizeof(arr));
				int j=2;
				for(int i=0;i<xx;i++)
				{
					arr[j]=false;
					j++;
					j=j+2;
				}
				j=j-1;
				for(int i=xx;i<n;i++)
				{
					arr[j]=false;
					j++;
					j=j+1;
				}

				for(ll i=0;i<n+m;i++)
				{
					if(arr[i]==false)
					{
						cout<<"0";
					}
					else
					{
						cout<<"1";
					}
				}
				cout<<endl;
			}
		}
		else
		{
			cout<<"-1"<<endl;
		 }

	}
}


#include<bits/stdc++.h>
#define ll long long int
#define pb(i) push_back(i)
#define endl "\n"
#define mod 1000000007
#define eps 10e-9
#define vi vector<int>
#define vli vector<ll>
using namespace std;
int main()
{
	int t=1;
//	cin>>t;

	while(t--)
	{
		ll n,m;
		cin>>n>>m;
		if(2*n+2>=m)
		{
			if((m/n)>=2)
			{
				ll arr[3000001];
				memset(arr,-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
			else
			{
				ll xx=m%n;
				ll pp=n-xx;
				ll arr[3000001];
				memset(arr,-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<xx;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				j=j-1;
				for(ll i=0;i<pp;i++)
				{
					arr[j]=0;
					j++;
					j=j+1;
				}

				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
		}
		else
		{
			cout<<"-1"<<endl;
		 }

	}
}


#include<bits/stdc++.h>
#define ll long long int
#define pb(i) push_back(i)
#define endl "\n"
#define mod 1000000007
#define eps 10e-9
#define vi vector<int>
#define vli vector<ll>
using namespace std;
int main()
{
	int t=1;
//	cin>>t;

	while(t--)
	{
		ll n,m;
		cin>>n>>m;
		if(2*n+2>=m)
		{
			if((m/n)>=2)
			{
				ll arr[n+m];
				memset(arr,-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
			else
			{
				ll xx=m%n;
				ll arr[n+m];
				memset(arr,-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<xx;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				j=j-1;
				for(ll i=xx;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+1;
				}

				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
		}
		else
		{
			cout<<"-1"<<endl;
		 }

	}
}


#include<bits/stdc++.h>
#define ll long long int
#define pb(i) push_back(i)
#define endl "\n"
#define mod 1000000007
#define eps 10e-9
#define vi vector<int>
#define vli vector<ll>
using namespace std;
int main()
{
	int t=1;
//	cin>>t;

	while(t--)
	{
		ll n,m;
		cin>>n>>m;
		if(2*n+2>=m)
		{
			if((m/n)>=2)
			{
				ll arr[3000001];
				memset(arr,-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
			else
			{
				ll xx=m%n;
				ll arr[3000001];
				memset(arr,-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<xx;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				j=j-1;
				for(ll i=xx;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+1;
				}

				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
		}
		else
		{
			cout<<"-1"<<endl;
		 }

	}
}


#include<bits/stdc++.h>
#define ll long long int
#define pb(i) push_back(i)
#define endl "\n"
#define mod 1000000007
#define eps 10e-9
#define vi vector<int>
#define vli vector<ll>
using namespace std;
int main()
{
	int t=1;
//	cin>>t;

	while(t--)
	{
		ll n,m;
		cin>>n>>m;
		if(2*n+2>=m)
		{
			if((m/n)>=2)
			{
				int arr[n+m];
				memset(arr,-1,sizeof(arr));
				int j=2;
				for(int i=0;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				for(int i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
			else
			{
				int xx=m%n;
				int arr[n+m];
				memset(arr,-1,sizeof(arr));
				int j=2;
				for(int i=0;i<xx;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				j=j-1;
				for(int i=xx;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+1;
				}

				for(int i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
		}
		else
		{
			cout<<"-1"<<endl;
		 }

	}
}


#include<bits/stdc++.h>
#define ll long long int
#define pb(i) push_back(i)
#define endl "\n"
#define mod 1000000007
#define eps 10e-9
#define vi vector<int>
#define vli vector<ll>
using namespace std;
int main()
{
	int t=1;
//	cin>>t;

	while(t--)
	{
		ll n,m;
		cin>>n>>m;
		if(2*n+2>=m)
		{
			if((m/n)>=2)
			{
				bool arr[n+m];
				memset(arr,true,sizeof(arr));
				int j=2;
				for(int i=0;i<n;i++)
				{
					arr[j]=false;
					j++;
					j=j+2;
				}
				for(int i=0;i<n+m;i++)
				{
					if(arr[i]==false)
					{
						cout<<"0";
					}
					else
					{
						cout<<"1";
					}
				}
				cout<<endl;
			}
			else
			{
				int xx=m%n;
				bool arr[n+m];
				memset(arr,true,sizeof(arr));
				int j=2;
				for(int i=0;i<xx;i++)
				{
					arr[j]=false;
					j++;
					j=j+2;
				}
				j=j-1;
				for(int i=xx;i<n;i++)
				{
					arr[j]=false;
					j++;
					j=j+1;
				}

				for(int i=0;i<n+m;i++)
				{
					if(arr[i]==false)
					{
						cout<<"0";
					}
					else
					{
						cout<<"1";
					}
				}
				cout<<endl;
			}
		}
		else
		{
			cout<<"-1"<<endl;
		 }

	}
}


#include<bits/stdc++.h>
#define ll long long int
#define pb(i) push_back(i)
#define endl "\n"
#define mod 1000000007
#define eps 10e-9
#define vi vector<int>
#define vli vector<ll>
using namespace std;
int main()
{
	int t=1;
//	cin>>t;

	while(t--)
	{
		ll n,m;
		cin>>n>>m;
		if(2*n+2>=m)
		{
			if((m/n)>=2)
			{
				ll a[3000001];
				memset(arr,-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
			else
			{
				ll xx=m%n;
				ll a[3000001];
				memset(arr,-1,sizeof(arr));
				ll j=2;
				for(ll i=0;i<xx;i++)
				{
					arr[j]=0;
					j++;
					j=j+2;
				}
				j=j-1;
				for(ll i=xx;i<n;i++)
				{
					arr[j]=0;
					j++;
					j=j+1;
				}

				for(ll i=0;i<n+m;i++)
				{
					cout<<-1*arr[i];
				}
				cout<<endl;
			}
		}
		else
		{
			cout<<"-1"<<endl;
		 }

	}
}


#include<bits/stdc++.h>
#include<windows.h>
#include<time.h>
#include <iostream>
using namespace std;
long long read() {
	long long f=1,w=0;
	char c=getchar();
	while(c>'9'||c<'0') {
		if(c=='-')f=-1;
		c=getchar();
	}
	while(c<='9'&&c>='0') {
		w=(w<<3)+(w<<1)+c-'0';
		c=getchar();
	}
	return w*f;
}
int main() {
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	ios::sync_with_stdio(0);
	int m=read(),n=read();
	if(n==2&&m==1)  {
		cout<<"010\n"<<endl;
		return 0;
	}
	if(n>m+1||m>n*2+2) {
		cout<<"-1"<<endl;
		return 0;
	} else {
		if(n>m) {
			for(int i=1; i<n; i++) {
				cout<<"01"<<endl;
			}
			cout<<0<<endl;
		} else {
			if(m>n*2) {
				for(int i=0; i<m-n*2; i++) {
					cout<<1;
				}
				m=n*2;
			}
			for(int i=0; i<m-n; i++) {
				cout<<"011";
			}
			for(int i=0; i<n*2-m; i++) {
				cout<<"01";
			}
		}
	}
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<string>
#define int long long
#define maxn 100010
#define inf 2147483647
#define mod 998244353
#define eps 1e-8
using namespace std;
inline int read(){
    int x=0,f=1; char ch=getchar();
    while(!isdigit(ch)) {if(ch=='-')f=-1;ch=getchar();}
    while(isdigit(ch)) {x=x*10+ch-48;ch=getchar();}
    return x*f;
}
signed main(){
	int n=read(),m=read();
	if(m>n*2+2||n-1>m) return puts("-1"),0;
	int flag=0;
	if(m-2*n==1) printf("1"),m--;
	else if(m-2*n==2) printf("11"),m-=2;
	else if(n-1==m) flag=1,n--;
	while(n!=m){
		printf("011");
		n--; m-=2;
	}
	for(int i=0;i<n;i++) printf("01");
	if(flag) printf("0");
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int n,m;
    bool flag1=false,flag2=false;
    cin>>n>>m;
    if(n>m+1||m>2*n+2)
        cout<<"-1"<<endl;
    else{
        if((m==2*n+1))
        {
            cout<<1;
            m--;
        }
        else if(m==2*n+2)
        {
            cout<<11;
            m-=2;
        }
        else if((n==m+1))
        {
            flag1=true;
            n--;
        }
        while(n!=m)
        {
            cout<<"011";
            n--;m-=2;
        }
        for(int i=0;i<n;i++)
        {
            cout<<"01";
            n--;m--;
        }
        if(flag1) cout<<"0";
        cout<<endl;
    }
    return 0;
}


#include<iostream>
using namespace std;
int s,n,a[6001],x;
int main()
{
	cin>>n;
	for (int i=1;i<=n;i++)
	{
	    cin>>x;
	    ++a[x];
    }
    for (int i=1;i<=n;i++)
    {
		if (a[i]>1)
		{
			a[i+1]+=a[i]-1;
			s=s+a[i]-1;
		}
	}
	cout<<s;
}


#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
	int n,m;

	ios_base::sync_with_stdio(false);
	cout.tie(NULL);
	cin.tie(NULL);

	cin>>n>>m;

	if(n > m+1 || m>2*n+2)
	{
		cout<<-1;
		return 0;
	}

		if(m == n-1)
		{
			for(int i=1;i<=m;i++)
			{
				cout<<01;
			}
			cout<<0;
		}
		else
		{
			int op=m-n-1;
			int py=0;
			for(int i=1;i<=n;i++)
			{
				if(op)
				{
					cout<<1;
					op--;
				}
				cout<<10;
			}

			if(op != -1) cout<<1;
       		while(op>0)
			{

            cout<<1;
            op--;

			}

		}
		return 0;

}


#include <iostream>

using namespace std;

int main()
{
    int n,m;
    bool flag1=false,flag2=false;
    cin>>n>>m;
    if(n>m+1||m>2*n+2)
        cout<<"-1"<<endl;
    else{
        if((n==m+1) || (m==2*n+1))
        {
            flag1=true;
            m--;
        }
        else if(m==2*n+2)
        {
            flag2=true;
            m-=2;
        }
        while(n!=m)
        {
            cout<<"110";
            n--;m-=2;
        }
        for(int i=0;i<n;i++)
        {
            cout<<"10";
            n--;m--;
        }
        if(flag1) cout<<"1"<<endl;
        if(flag2) cout<<"11"<<endl;
    }
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;
int n,m;
int main()
{
	scanf("%d%d",&n,&m);
	if(n>m+1||m>2*n+2)
	{
		printf("-1");
		return 0;
	}
	if(n==m+1)
	{
		for(int i=1;i<=n;i++)
		{
			printf("01");
		}
		printf("0");
		return 0;
	}
	if(n==m)
	{
		for(int i=1;i<=n;i++)
		{
			printf("01");
		}
		return 0;
	}
	if(m>n&&m<=2*n)
	{
		int i=m-n;
		for(int j=1;j<=(n-i);j++)
		{
			printf("01");
		}
		for(int k=1;k<=i;k++)
		{
			printf("011");
		}
		return 0;
	}
	if(m>2*n)
	{
		for(int i=1;i<=n;i++)
		{
			printf("110");
		}
		int j=m-2*n;
		for(int i=1;i<=j;i++)
		{
			printf("1");
		}
		return 0;
	}
	return 0;
}


/*#include<bits/stdc++.h>
using namespace std;
#define l 200

struct Node
{
    int a;
    int b;
}p[l];

bool cmp(Node x,Node y)
{
    if(x.b==y.b)
    {
        return x.a>y.a;
    }
    return x.b<y.b;
}

int main()
{
    int n,r,avg,i;
    int64_t s;
    cin>>n>>r>>avg;
    avg*=n;
    for(i=1;i<=n;i++)
    {
        cin>>p[i].a>>p[i].b;
        avg-=p[i].a;
        p[i].a=r-p[i].a;
    }
    s=0;
    sort(p+1,p+n+1,cmp);
    if(avg<=0)
    {
        cout<<0<<endl;
        return 0;
    }
    for(i=1;i<=n;i++)
    {
        if(avg>=p[i].a)
        {
            s+=p[i].a*p[i].b;
            avg-=p[i].a;
            continue;
        }
        if(avg<p[i].a)
        {
            s+=p[i].b*avg;
            break;
        }
    }
    cout<<s<<endl;
    return 0;
}*/
#include<bits/stdc++.h>
using namespace std;

int main()
{
    int a,b,i;
    string s;
    cin>>a>>b;
    s="";
    if(b>2*a+2||a>b+1)
    {
        cout<<-1<<endl;
        return 0;
    }
    if(a<b)
    {
        s="1";
        for(i=1;i<=a;i++)
        {
            s+="01";
        }
        b-=a+1;
        if(b==0)
        {
            cout<<s<<endl;
            return 0;
        }
        b--;
        s="1"+s;
        i=3;
        while(b!=0)
        {
            s.insert(i,"1");
            b--;
            i+=3;
        }
        cout<<s<<endl;
        return 0;
    }
    if(a>=b)
    {
        for(i=1;i<=b;i++)
        {
            s+="01";
        }
        if(a>b)
        {
            s+="0";
        }
        cout<<s<<endl;
        return 0;
    }
    return 0;
}


// luogu-judger-enable-o2
#include<iostream>
using namespace std;
int n,m;
int main()
{
	cin>>n>>m;
	if(n>m+1||m>2*n+2){cout<<"-1\n";return 0;}
	if(n==m)
	{
		for(int i=1;i<=n;i++)cout<<10;
		return 0;
	}
	if(n==m+1)
	{
        cout<<0;
        for(int i=1;i<=m;i++)cout<<10;
        return 0;
    }
    int x=m/2;
    while(n>x&&n!=0)cout<<"10",m--,n--,x=m/2;
    for(int i=1;i<=n;i++)cout<<"110",m-=2;
    for(int i=1;i<=m;i++)cout<<"1";
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;
int a[2000010];
int main()
{
	int n,m;
	scanf("%d%d",&n,&m);
	if(m-2>2*n||m<n-1)
	{
		printf("-1");
		return 0;
	}
	if(m>=n)
	{
		while(n>0&&m>0)
		{
			if(m==n) printf("10");
			else
			{
			printf("110");
			m-=2;
			n--;
			}
		}
		for(int i=1;i<=m;i++)
		printf("1");
	}
	return 0;
}


#include<bits/stdc++.h>
#define re register
using namespace std;

inline int read(){
	re int ans = 0;re bool f = 1;re char ch = getchar();
	while(ch<'0'||ch>'9'){if (ch=='-')f = 0;ch = getchar();}
	while(ch>='0'&&ch<='9'){
		ans = (ans<<3)+(ans<<1)+(ch^48);
		ch = getchar();
	}
	return f?ans:~(ans-1);
}

signed main(void){
	int n = read(),m = read();
	if(n*2+2<m||n>m+1)printf("-1");
	else{
		if(n>m){printf("0");n--;}
		while(n<m&&n&&m){n--;m-=2;printf("110");}
		while(n&&m){printf("10");n--;m--;}
		while(m--)printf("1");
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n,m;
bool flag=0;
int main(){
    scanf("%d%d",&n,&m);
    if(n>m+1||m>n*2+2){
        printf("-1");
        return 0;
    }
    if(n>=m+1){
        if(n==m)
            flag=1;
        for(int i=1;i<=m;i++)
            printf("01");
        if(!flag)
            printf("0");
    }
    else{
        int more=m-n-1;
        for(int i=1;i<=n;i++){
            if(more){
                printf("1");
                more--;
            }
            printf("10");
        }
        more++;
        while(more){
            printf("1");
            more--;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n,m;
bool flag=0;
int main(){
    scanf("%d%d",&n,&m);
    if(n>m+1||m>n*2+2){
        printf("-1");
        return 0;
    }
    if(n==m+1){
        for(int i=1;i<=m;i++)
            printf("01");
        printf("0");
    }
    else{
        int more=m-n-1;
        for(int i=1;i<=n;i++){
            if(more>0){
                printf("1");
                more--;
            }
            printf("10");
        }
        if(more!=-1) printf("1");
        while(more>0){
            printf("1");
            more--;
        }
    }
    return 0;
}


#include<iostream>
#include<cstdio>
using namespace std;
int n,m;
int main()
{
	scanf("%d%d",&n,&m);
	if(n>m+1||m>2*n+2)
	{
		printf("-1");
		return 0;
	}
	if(n==m+1)
	{
		for(int i=1;i<=m;i++)
		{
			printf("01");
		}
		printf("0");
		return 0;
	}
	if(n==m)
	{
		for(int i=1;i<=n;i++)
		{
			printf("01");
		}
		return 0;
	}
	if(m>n&&m<=2*n)
	{
		int i=m-n;
		for(int j=1;j<=(n-i);j++)
		{
			printf("01");
		}
		for(int k=1;k<=i;k++)
		{
			printf("011");
		}
		return 0;
	}
	if(m>2*n)
	{
		for(int i=1;i<=n;i++)
		{
			printf("110");
		}
		int j=m-2*n;
		for(int i=1;i<=j;i++)
		{
			printf("1");
		}
		return 0;
	}
	return 0;
}


#include<bits/stdc++.h>
#include<windows.h>
#include<time.h>
#include <iostream>
using namespace std;
long long read() {
	long long f=1,w=0;
	char c=getchar();
	while(c>'9'||c<'0') {
		if(c=='-')f=-1;
		c=getchar();
	}
	while(c<='9'&&c>='0') {
		w=(w<<3)+(w<<1)+c-'0';
		c=getchar();
	}
	return w*f;
}
int main() {
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	ios::sync_with_stdio(0);
	int n=read(),m=read();
	if(n>m+1||m>n*2+2) {
		cout<<"-1"<<endl;
		return 0;
	} else {
		if(n>m) {
			for(int i=1; i<=m; i++) {
				cout<<"01"<<endl;
			}
			cout<<0<<endl;
		} else {
			if(m>n*2) {
				for(int i=0; i<m-n*2; i++) {
					cout<<1;
				}
				m=n*2;
			}
			for(int i=0; i<m-n; i++) {
				cout<<"011";
			}
			for(int i=0; i<n*2-m; i++) {
				cout<<"01";
			}
		}
	}
	return 0;
}


#include<bits/stdc++.h>
#define re register
using namespace std;

inline int read(){
	re int ans = 0;re bool f = 1;re char ch = getchar();
	while(ch<'0'||ch>'9'){if (ch=='-')f = 0;ch = getchar();}
	while(ch>='0'&&ch<='9'){
		ans = (ans<<3)+(ans<<1)+(ch^48);
		ch = getchar();
	}
	return f?ans:~(ans-1);
}

signed main(void){
	int n = read(),m = read();
	if(n*2+2<m){
		printf("-1");
	}
	else{
		while(n<m){n--;m-=2;printf("110");}
		while(n||m){
			if(m>0){printf("1");m--;}
			if(n>0){printf("0");n--;}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;

int main() {
    int n, m;
    cin >> n >> m; //n为0的个数,m为1的个数
    if(n>m+1||m>2*n+2)  cout << "-1";
    else {
        //分类讨论!!
        int k;
        if(m>=n&&m<=2*n) {
            k=m-n;
            for(int i=1;i<=k;i++) cout<<"110";
            for(int i=1;i<=(n-k);i++) cout<<"10";
            }
        else if(m>=n&&m>2*n) {
            for(int i=1;i<=n;i++) cout<<"110";
            if(m%2==1)
                cout<<"1";
            else if(m%2==0)
                cout<<"11";
            }
        else if(m<n) {
            for(int i=1;i<=m;i++) cout<<"01"; //这里跟上面不一样的哈！
            cout<<"0";
        }
    }
    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int n,m;
    bool flag1=false,flag2=false;
    cin>>n>>m;
    if(n>m+1||m>2*n+2)
        cout<<"-1"<<endl;
    else{
        if((n==m+1) || (m==2*n+1))
        {
            flag1=true;
            m--;
        }
        else if(m==2*n+2)
        {
            flag2=true;
            m-=2;
        }
        while(n!=m)
        {
            puts("110");
            n--;m-=2;
        }
        for(int i=0;i<n;i++)
        {
            puts("10");
            //n--;m--;
        }
        if(flag1) cout<<"1"<<endl;
        if(flag2) cout<<"11"<<endl;
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int main()
{
    int a,b,i;
    string s;
    cin>>a>>b;
    s="";
    if(b>2*a+2||a>b+1)
    {
        cout<<-1<<endl;
        return 0;
    }
    if(a>=b)
    {
        for(i=1;i<=b;i++)
        {
            s+="01";
        }
        if(a>b)
        {
            s+="0";
        }
        cout<<s<<endl;
        return 0;
    }
    s="1";
    for(i=1;i<=a;i++)
    {
        s+="01";
    }
    b-=a+1;
    if(b==0)
    {
        cout<<s<<endl;
        return 0;
    }
    b--;
    s="1"+s;
    i=3;
    while(b!=0)
    {
        s.insert(i,"1");
        b--;
        i+=3;
    }
    cout<<s<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n,m;
bool flag=0;
int main(){
    scanf("%d%d",&n,&m);
    if(n>m+1||m>n*2+2){
        printf("-1");
        return 0;
    }
    if(n==m+1){
        for(int i=1;i<=m;i++)
            printf("01");
        printf("0");
    }
    else{
        int more=m-n-1;
        for(int i=1;i<=n;i++){
            if(more>0){
                printf("1");
                more--;
            }
            printf("10");
        }
        if(more!=-1) printf("1");
        while(more>0){
            printf("-1");
            more--;
        }
    }
    return 0;
}


#include<iostream>
#include<cstdio>

using namespace std;

int n,m;

int main()
{
	cin>>n>>m;
	if(m<n-1||m>2*(n-1))
	{
		cout<<"-1";
		return 0;
	}
 	return 0;
}


#include<iostream>
#include<cstdio>

using namespace std;

int n,m,k,l;

void out()
{
    for(int i=1; i<=n; i++)
    {
        cout<<"10";
    }
    return ;
}
int main()
{
    cin>>n>>m;
    if(n>m+1||m>2*(n+1))
    {
        cout<<"-1";
        return 0;
    }
    if(n==m)
    {
        out();
        return 0;
    }
    if(n>m)
    {
        cout<<"0";
        n--;
        out();
        return 0;
    }
    k=m/2;
    while(n>k&&n!=0)
    {
        cout<<"1";
        m--;
        cout<<"0";
        n--;
        k=m/2;
    }
    l=n;
    for(register int i=1; i<=n; i++)
    {
        cout<<"110";
        m--;
        m--;
        l--;
    }
    if(m==1)
    {
        cout<<"1";
    }
    else
    {
        if(m==2)
        {
            cout<<"11";
        }
    }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
#include<vector>
#include<map>
#include<cmath>

using namespace std;

int n,m;

int main(){
    scanf("%d%d",&n,&m);
    if(n>m+1||m>n*2+2){ //判断无解情况，即1不足或1过量
        printf("-1");
        return 0;
    }
    if(n==m+1){
        for(int i=1;i<=m;i++)
            printf("01");   //特判
        printf("0");
    }
    else{
        int more=m-n-1;   //more是指多出来的个数
        for(int i=1;i<=n;i++){
            if(more>0){
                printf("1");
                more--;
            }
            printf("10");
        }
        if(more!=-1) {
        	printf("1");
		}
        while(more>0){
            printf("1");
            more--;
        }
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;

int n,m,x,i;
int main()
{
	cin>>n>>m;
	if(n>m+1||m>n*2+2){
		cout<<-1;
		return 0;
	}
	if(n>m)
	{
		for(i=1;i<=m;++i) cout<<"01";
		cout<<"0";
		return 0;
	}else
	{
		x=m-n;
		for(i=1;i<=n;++i)
		    if(i<=x)
		        cout<<"110";else cout<<"10";
		if(m>n*2)
		    cout<<1;else if(m>n*2+1)
		    cout<<11;
	}
}


#include<iostream>
using namespace std;
int n,m;
bool flag;

//n ~ 0 ~ 1
//m ~ 1 ~ 1/2

int main(){
	cin >> n >> m;
	if(m >= n) flag  = true;
	else flag = false;

	if(!flag){
		if(n - m > 1){
			cout << -1;
			return 0;
		}else if(n - m == 1 || n == m){
			for(int i = 1;i <= m + n;i++){
				if(i % 2 == 1) cout << 0;
				else cout << 1;
			}
			return 0;
		}
	}
	if(flag){
		if(n*2+2 < m){
			cout << -1;
			return 0;
		}else{
			if(n+1 == m){
				cout << 1;
				for(int i = 1;i <= n;i++){
					cout << "01";
				}
				return 0;
			}

			int cnt = m - n;
			for(int i = 1;i <= n;i++){
				if(cnt>0) cnt--,cout << 1;
				cout << 10;
				//cout << cnt << endl;
			}
			if(cnt) cout <<"11";
		}
	}
}


#include<bits/stdc++.h>
#define N 2001000
using namespace std;
string s;
bool pre0[N];
int n,m;

void Construct()
{
    if (n==m+1)
    {
        for(int i=0;i<n+m;i++)
        {
            putchar(i%2+'0');
        }
        putchar('\n');
        return;
    }
    if (n>=(m+1)/2-1 and n<=m+1)
    {
        for(int i=0;i<m;i++)
        {
            s+='1';
        }

        int cnt0=0;
        for(int i=2;i<m;i+=2)
        {
            pre0[i]=1;++cnt0;
        }

        int rest=n-cnt0;
        int put=0,pos=0;
        while(put<rest)
        {
            while(pre0[pos]) ++pos;
            pre0[pos]=1;++put;
        }

        for(int i=0;i<m;i++)
        {
            if (pre0[i])
            {
                putchar('0');
            }
            putchar('1');
        }
    }
    else
    {
        puts("-1");
    }
}
main()
{
    scanf("%d%d",&n,&m);
    Construct();
    return 0;
}


#include<bits/stdc++.h>
#define re register
using namespace std;

inline int read(){
	re int ans = 0;re bool f = 1;re char ch = getchar();
	while(ch<'0'||ch>'9'){if (ch=='-')f = 0;ch = getchar();}
	while(ch>='0'&&ch<='9'){
		ans = (ans<<3)+(ans<<1)+(ch^48);
		ch = getchar();
	}
	return f?ans:~(ans-1);
}

signed main(void){
	int n = read(),m = read();
	if(n*2+2<m){
		printf("-1");
	}
	else{
		while(n&&m){
			if(n<=m){
				printf("110");
				n--;m-=2;
			}
			else{
				printf("10");
				n--;m--;
			}
		}
		while(m--)printf("1");
	}
	return 0;
}


#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
	int n,m;

	ios_base::sync_with_stdio(false);
	cout.tie(NULL);
	cin.tie(NULL);

	cin>>n>>m;

	if(m <= n+1)
	{
		if(m < n )
		{
			cout<<-1;
			return 0;
		}
		for(int i=1;i<=m+n;i++)
		{
			if(i&1)
			{
				cout<<1;
			}
			else cout<<0;
		}
		return 0;
	}
	else
	{
		if(m<=2*(n+1))
		{
			int op=m-(n+1);
			for(int i=1;i<= 2*n + 1;i++)
			{
				if(i&1)
				{
					cout<<1;
					if(op)
					{
						cout<<1;
						op--;
					}
				}
				else cout<<0;
			}
			return 0;
		}
		else
		{
			cout<<-1;
			return 0;
		}
	}

}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <stdlib.h>
#include <stack>
#include <queue>
#define ri register int

inline int read()
{
    int x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
    return x*f;
}

int main(){
	int m=read(),n=read();
	if(m>n+1||n-2*(m+1)>=1){
		printf("-1");
		exit(0);
	}
	int l1=(m+1)-((m+1)*2-n);
	for(ri i=1;i<l1;i++)printf("110");
	std::cout<<(l1==m+1?"11":"110");
	int l2=m-l1;
	if(l2<0)exit(0);
	for(ri i=1;i<=l2;i++)printf("10");
	if(l1*2+l2!=n){
		for(ri i=1;i<=n-(l1*2+l2);i++)printf("1");
	}
	return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#define rep(i, l, r) for (int i = (l); i <= (r); ++i)
#define per(i, l, r) for (int i = (l); i >= (r); --i)
using std::cin; using std::cout; using std::cerr; using std::endl; using std::string;
typedef long long ll;
int main(){
    int n,m;
    string a="01";
    string b="011";
    //freopen("triangle.in", "r", stdin);
    //freopen("triangle.out", "w", stdout);
    std::ios::sync_with_stdio(false);
    cout.tie(0);
    cin>>n>>m;
    if(m==0){cout<<-1<<endl; return 0;}
    if(n+m<4){
      if(n>=2||m==3) {cout<<-1<<endl;return 0;}
      if(n=1){
        rep(i,1,m) cout<<1;
        rep(i,1,n) cout<<0;
        return 0;
      }
    } else{
    m--;
    m=2*n-m;
    n=n-m;
    if(n<0||m<0) cout<<-1<<endl; else {
      cout<<"1";
      rep(i,1,m) cout<<a;
      rep(i,1,n) cout<<b;
      cout<<endl;
    }
  }
    return 0;
}


/*首先判断是否可以组成一个满足条件的序列 不可以直接返回
判断1比0多多少个 假设1比0多x个
如果x<=零的个数 那么有x个110 其余为10
如果x>n 那么有n个110 剩下的全部为1
*/
#include<bits/stdc++.h>
using namespace std;
int n,m;
 int main()
 {
 	cin>>n>>m;//n-0 m-1
 	if(n>m+1||m>2*n+2)//不符合条件
 	{
 		cout<<-1<<endl;
 		return 0;
	 }
	 if(n>m){//n==m+1
	 	for(int i=1;i<=m;i++)cout<<01;
		 cout<<"0";
		 return 0;
	 }
//1比0多多少
 	if(m<=2*n)
 	{
 		int t=m-n;
 		for(int i=1;i<=t;i++)
 		{
 			cout<<"110";
 		}
	 	for(int i=1;i<=n-t;i++)
		{
	 		cout<<"10";
	 	}
	}
	 else//m>2*n
	 {
	 	for(int i=1;i<=n;i++)
	 	cout<<"110";
	 	int crr=m-n*2; //1或2
	 	for(int i=1;i<=crr;i++)
	 	cout<<"1";
	}
 }


#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string>

using namespace std;

int main()
{
    int n,m,p=0;
    string s;
//       0  1
    cin>>n>>m;
    if (m>n*2+2)
    {
        cout<<-1<<endl;
        return 0;
    }
    if (m<n-1)
    {
        cout<<-1<<endl;
        return 0;
    }
    s="";
    while (n>=1 && m>=2)
    {
        n--,m-=2;
        s+="110";
        p+=3;
    }
    if (n==0)
    {
        while (m--) s+="1",p++;
    }
    if (m==0)
    {
        int i=p;
        while (n>0)
        {
            i--;
            while (s[i]=='0'||s[i-1]=='0' && i>=0) i--;
            n--;
            s.insert(i,"0");
        }
    }
    if (m==1)
    {
        while (m--) s+="1",p++;
        int i=p;
        while (n>0)
        {
            i--;
            while (s[i]=='0'||s[i-1]=='0' && i>=0) i--;
            n--;
            s.insert(i,"0");
        }
    }
    cout<<s<<endl;
    return 0;
}


// luogu-judger-enable-o2
#include<bits/stdc++.h>
using namespace std;
int n,m;
int main(){
	cin>>n>>m;
	if(n>m+1||m>n*2+2)cout<<-1;
	else{
		if(n>m){
			for(int i=1;i<n;i++)cout<<"01";
			cout<<0;
		}
		else{
			if(m>n*2){for(int i=0;i<m-n*2;i++)cout<<1;m=2*n;}
			for(int i=0;i<m-n;i++)cout<<"011";
			for(int i=0;i<n*2-m;i++)cout<<"01";
		}
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
int n,m;
 int main()
 {
 	cin>>n>>m;//n-0 m-1
 	if(n>m+1||m>2*n+2)//不符合条件
 	{
 		cout<<"-1"<<endl;
 		return 0;
	 }
	 if(n>m){//n==m+1
	 	for(int i=1;i<=m;i++)cout<<"01";
		 cout<<"0";
		 return 0;
	 }
//1比0多多少
 	if(m<=2*n)
 	{
 		int t=m-n;
 		for(int i=1;i<=t;i++)
 		{
 			cout<<"110";
 		}
	 	for(int i=1;i<=n-t;i++)
		{
	 		cout<<"10";
	 	}
	}
	 else//m>2*n
	 {
	 	for(int i=1;i<=n;i++)
	 	cout<<"110";
	 	int crr=m-n*2; //1或2
	 	for(int i=1;i<=crr;i++)
	 	cout<<"1";
	}
 }


#include<iostream>
#include<cstdio>
using namespace std;
int n,m;
int main(){
	int i;
	scanf("%d %d",&n,&m);
	if(m>2*(n+1)||n>m+1){
		cout<<"-1";
		return 0;
	}
	while(n!=0||m!=0){
		if(n==2&&m==1){
			cout<<"010";
			return 0;
		}
		if(m>=2){
			cout<<"11";
			m-=2;
		}else{
			if(m==1){
				cout<<"1";
				m--;
			}
		}
		if(n>=1){
			cout<<"0";
			n--;
		}
	}
	return 0;
}


#include<iostream>
#include<cstring>
#include<cstdio>

using namespace std;

int main()
{
	int n,m;
	cin>>n>>m;
	if (n>m+1 || m>n*2+2)
	{
		cout<<-1<<endl;
		return 0;
	}
	if (n==m+1)
	{
		for (int i=1;i<=m;i++)
			cout<<0<<1;
		cout<<endl;
		return 0;
	}
	if (m==n*2+2)
	{
		for (int i=1;i<=n;i++)
			cout<<110;
		cout<<11<<endl;
		return 0;
	}
	if (n==2 && m==1)
	{
		cout<<"010"<<endl;
		return 0;
	}
	if(n*2>m)
	{
		for (int i=1;i<=m-n;i++ )
			cout<<110;
		for ( int i=1;i<=n-m/2;i++)
			cout<<1010;
		if(m&1) cout<<10;
		cout<<endl;
		return 0;
	}
	for (int i=1;i<=n;i++)
		cout<<110;
	if (m-n*2!=0) for (int i=1;i<=m-n*2;i++) cout<<1;
	cout<<endl;
	return 0;
}


#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#define rep(i, l, r) for (int i = (l); i <= (r); ++i)
#define per(i, l, r) for (int i = (l); i >= (r); --i)
using std::cin; using std::cout; using std::cerr; using std::endl; using std::string;
typedef long long ll;
int main(){
    int n,m;
    string a="01";
    string b="011";
    //freopen("triangle.in", "r", stdin);
    //freopen("triangle.out", "w", stdout);
    std::ios::sync_with_stdio(false);
    cout.tie(0);
    cin>>n>>m;
    if(m==0){cout<<-1<<endl; return 0;}
    if(n+m<4){
      if(n>=2||m==3) {cout<<-1<<endl;return 0;}
      if(n==1){
        rep(i,1,m) cout<<1;
        rep(i,1,n) cout<<0;
        return 0;
      }
    } else{
    m--;
    m=2*n-m;
    n=n-m;
    if(n<0||m<0) cout<<-1<<endl; else {
      cout<<"1";
      rep(i,1,m) cout<<a;
      rep(i,1,n) cout<<b;
      cout<<endl;
    }
  }
    return 0;
}


#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<string>
#include<cstring>
#include<stack>
#include<queue>
#include<vector>
#include<map>
using namespace std;
int n,m;
int main()
{
	cin>>n>>m;
	if(m<n-1||m>(n*2)+2)
	{
		cout<<"-1";
		exit(0);
	}
	else if(n==m+1)
	{
		cout<<"0";
		n--;
	}
	while(m!=n&&n&&m)
	{
		cout<<"110";
		m-=2;
		n--;
	}
	while(n&&m)
	{
		cout<<"10";
		n--;
		m--;
	}
	while(m)
	{
		cout<<"1";
		m--;
	}
	return 0;
}


#include<iostream>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<algorithm>

using namespace std;

int n,m,tot1,tot2;

int main(){
	scanf("%d%d",&n,&m);
	if(m>2*n+2){
		cout<<-1;
		return 0;
	}
	if(m<n-1){
	    cout<<-1;
	    return 0;
	}
//	tot1=m;
	tot2=n;
	if(n==m)
	for(int i=1;i<=n;i++){
		cout<<"01";
	}
	if(n-1==m){
	    for(int i=1;i<=n-1;i++){
		    cout<<"01";
	    }
		cout<<0;
	}
	if(n+1==m){
	    for(int i=1;i<=m-1;i++){
		    cout<<"10";
	    }
		cout<<1;
	}
	if(m=2*n+2){
		for(int i=1;i<=n;i++){
			cout<<"110";
		}
		cout<<11;
	}
	else{
		tot1=m-n-1;
		for(int i=1;i<=n;i++){
			if(tot1) cout<<"1"<<"1"<<"0";
			if(!tot1) cout<<"1"<<"0";
			tot1--;
			tot2--;
			if(!tot2){
				for(int i=1;i<=m-2*tot1-(m-tot1);i++){
					cout<<"1";
				}
			}
		}
	}
	return 0;
}


#include<iostream>
using namespace std;

int main() {
    int n, m;
    cin >> n >> m; //n为0的个数,m为1的个数
    if(n>m+1||m>2*n+2)	cout << "-1";
    else {
        int k;
        if(m>=n&&m<=2*n) {
            k=m-n;
            for(int i=1;i<=k;i++) cout<<"110";
            for(int i=1;i<=(n-k);i++) cout<<"10";
            }
        else if(m>=n&&m>2*n) {
            for(int i=1;i<=n;i++) cout<<"110";
			if(m%2==1)
				cout<<"1";
			else if(m%2==0)
				cout<<"11";
            }
        else if(m<n) {
            for(int i=1;i<=m;i++) cout<<"01";
			cout<<"0";
        }
    }
    return 0;
}


/*
 * socode.online
 *
 * Author: haddieszyf
 * E-mail: 1131867433@qq.com
 * Time  : 2020-02-08 19:37:26
 */
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m;
	cin>>n>>m;
	if(n>m+1){
		printf("-1");
		return 0;
	}
	if(m>2*(n+1)){
		printf("-1");
		return 0;
	}
	if(n>=m){
		for(int i=1;i<=m;i++){
			printf("01");
		}
		printf("0");
		return 0;
	}
	int t=m-n;
	int num=0;
	for(int i=1;i<=n;i++){
		printf("10");
		num++;
		if(num>t) continue;
		printf("1");
	}
	return 0;
}


/*
 * socode.online
 *
 * Author: haddieszyf
 * E-mail: 1131867433@qq.com
 * Time  : 2020-02-08 19:37:26
 */
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,m;
	cin>>n>>m;
	if(n>m+1||m>2*(n+1)){
		printf("-1");
		return 0;
	}
	if(n==m){
		for(int i=1;i<=m;i++){
			printf("01");
		}
		return 0;
	}
	if(n>m){
		for(int i=1;i<=m;i++){
			printf("01");
		}
		printf("0");
		return 0;
	}
	int t=m-n;
	int num=0;
	for(int i=1;i<=n;i++){
		printf("10");
		num++;
		if(num>t) continue;
		printf("1");
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
const int maxn=1e6+5;
int n,m;
int num[maxn];
int main(){
	cin>>n>>m;
	if(m<n-1||m>2*(n+1)){
		cout<<-1;
	}else
	{
		for(int i=1;i<=n-1;i++){
			num[i]++;
		}
		m-=n-1;
		for(int i=0;i<=n&&m!=0;i++){
			int d=min(m,2-num[i]);
			num[i]+=d;
			m-=d;
		}
		for(int i=0;i<=n;i++){
			if(i!=0){
				cout<<"0";
			}
			while(num[i]--){
				cout<<"1";
			}
		}
	}
	return 0;
}


a=[]
b=[]
n,t=map(int,input().split())
l=list(map(int,input().split()))
l.insert(0,0)
for x in range(1,n+1):
	a.append(l[x]-l[x-1])
for x in range(len(a)):
	if a[x]>t:b.append(x)
print(n-b[-1])


a,b=map(int,input().split())
count=1
l=list(map(int,input().split()))
c=l[0]
for x in range(1,a):
	if l[x]-l[x-1]<=b:
		count+=1
	else:
		count=1
print(count)


a=[]
b=[]
n,t=map(int,input().split())
l=list(map(int,input().split()))
l.insert(0,0)
for x in range(1,len(l)):
	if l[-x]-l[-(x+1)]>t:
		print(x)
		break


a=[]
b=[]
n,t=map(int,input().split())
l=list(map(int,input().split()))
for x in range(1,n):
	a.append(l[x]-l[x-1])
for x in range(n-1):
	if a[x]>t:b.append(x)
print(n-b[-1]-1)


a=[]
b=[]
n,t=map(int,input().split())
l=list(map(int,input().split()))
if n==1:
	a.append(l[0])
	print("1")
else:
	for x in range(1,n):
		a.append(l[x]-l[x-1])
	for x in range(len(a)):
		if a[x]>t:b.append(x)
	print(n-b[-1]-1)


cnt, batch = input().split()
cnt = int(cnt)
batch = int(batch)
times = list(map(int, input().split()))
for i in range(len(times)-1):
    if times[-i - 1] - times[-i - 2] > batch:
        break
print(i + 1)


cnt, batch = input().split()
cnt = int(cnt)
batch = int(batch)
times = list(map(int, input().split()))
flag = 1
for i in range(len(times) - 1):
    if times[-i - 1] - times[-i - 2] > batch:
        flag = 0
        break
if flag:
    print(len(times))
else:
    print(i + 1)


cnt, batch = input().split()
cnt = int(cnt)
batch = int(batch)
times = list(map(int, input().split()))
for i in range(len(times) - 1):
    if times[-i - 1] - times[-i - 2] > batch:
        break
if i + 2 == len(times):
    print(i + 2)
else:
    print(i + 1)


cnt, batch = input().split()
cnt = int(cnt)
batch = int(batch)
times = list(map(int, input().split()))
for i in range(len(times)):
    if times[-i - 1] - times[-i - 2] > batch:
        break
print(i + 1)


n,c=map(int,input().split())
s=list(map(int,input().split()))
k=1
if n==1 :
    k=1
else:
    for i in range(n-1,0,-1):
        if s[i]-s[i-1]<=c:
            k+=1
        else:
            break
print(k)


n,c=map(int,input().split())
s=list(map(int,input().split()))
k=0
if n==1 :
    k=1
else:
    for i in range(n-1,0,-1):
        if s[i]-s[i-1]<=c:
            k+=1
        else:
            break
print(k)


n,c=map(int,input().split())
s=list(map(int,input().split()))
k=0
if n==1 :
    k=1
else:
    for i in range(n-1):
        if s[i+1]-s[i]<=c:
            k+=1
        else:
            k=1
print(k)


n,c=map(int,input().split())
s=list(map(int,input().split()))
k=0
for i in range(n-1):
    if s[i+1]-s[i]<=c:
        k+=1
    else:
        k=1
print(k)


# Crazy Computer
def letters(arr, c):
    ans = 1
    for i in range(1, len(arr)):
        if (arr[i] - arr[i-1] <= c):
            ans += 1
        else:
            ans = 1
    return ans

n, c = list(map(int, input().rstrip().split()))
arr = list(map(int, input().rstrip().split()))
print(letters(arr, c))


# Crazy Computer
def letters(arr, c):
    ans = 1
    for i in range(1, len(arr)):
        if (arr[i] - arr[i-1] <= c):
            ans += 1
        else:
            ans = 0
    return ans + 1

n, c = list(map(int, input().rstrip().split()))
arr = list(map(int, input().rstrip().split()))
print(letters(arr, c))


n , c = map(int,input().split())
# print(n)
# print(c)
for i in range(n):
	lst = list(map(int, input().split()))
	a = 1
	for j in range(0, n-1):
		# print(j)
		if lst[j+1]-lst[j] <= c:
			a += 1
		else:
			a = 1
	print(a)


n , c = map(int,input().split())
for i in range(n):
	lst = list(map(int, input().split()))
	a = 0
	for j in range(n):
		if lst[j+1]-lst[j] <= c:
			a += 1
		else:
			a = 0
	print(a)


n , c = map(int,input().split())
# print(n)
# print(c)

lst = list(map(int, input().split()))
a = 1
for j in range(0, n-1):
	# print(j)
	if lst[j+1]-lst[j] <= c:
		a += 1
	else:
		a = 1
print(a)


n, c = map(int, input().split(' '))
t = [int(s) for s in input().split(' ')]
ans = n
for i in range(1, n - 1):
    if t[n - i] - t[n - i - 1] > c:
        ans = i
        break
print(ans)


n, c = map(int, input().split(' '))
t = [int(s) for s in input().split(' ')]
ans = n
for i in range(1, n):
    if t[n - i] - t[n - i - 1] > c:
        ans = i
        break
print(ans)


def main():
	n, c = map(int, input().split())
	a = list(map(int, input().split()))
	count = 1
	for i in range(1, n):
		if a[i] - a[i - 1] > c:
			count = 0
		else:
			count += 1
	print(count + 1)

if __name__ == '__main__':
	main()


def main():
	n, c = map(int, input().split())
	a = list(map(int, input().split()))
	count = 1
	for i in range(1, n):
		if a[i] - a[i - 1] > c:
			count = 0
		else:
			count += 1
	if n == 1:
		print(count)
	else:
		print(count + 1)

if __name__ == '__main__':
	main()


def main():
	n, c = map(int, input().split())
	a = list(map(int, input().split()))
	count = 1
	for i in range(1, n):
		if a[i] - a[i - 1] > c:
			count = 1
		else:
			count += 1
	print(count)

if __name__ == '__main__':
	main()


#                          JAI SHREE RAM

import math; from collections import *
import sys; from functools import reduce

# sys.setrecursionlimit(10**6)
def get_ints(): return map(int, input().strip().split())
def get_list(): return list(get_ints())
def get_string(): return list(input().strip().split())
def printxsp(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")

UGLYMOD = int(1e9)+7; SEXYMOD = 998244353; MAXN = int(1e5)

# sys.stdin=open("input.txt","r");sys.stdout=open("output.txt","w")

# for _testcases_ in range(int(input())):
n, k = get_ints()
li = get_list()
last = 0
ans = 1
for i in range(n):
    if li[i] - last > k:
        ans = 1
    else :
        ans += 1
    last = li[i]
print(ans)

'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS MINE @luctivud ( UDIT GUPTA )
Link may be copy-pasted here if it's taken from other source.
DO NOT PLAGIARISE.
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''


#                          JAI SHREE RAM

import math; from collections import *
import sys; from functools import reduce

# sys.setrecursionlimit(10**6)
def get_ints(): return map(int, input().strip().split())
def get_list(): return list(get_ints())
def get_string(): return list(input().strip().split())
def printxsp(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")

UGLYMOD = int(1e9)+7; SEXYMOD = 998244353; MAXN = int(1e5)

# sys.stdin=open("input.txt","r");sys.stdout=open("output.txt","w")

# for _testcases_ in range(int(input())):
n, k = get_ints()
li = get_list()
last = li[0]
ans = 1
for i in range(1, n):
    if li[i] - last > k:
        ans = 1
    else :
        ans += 1
    last = li[i]
print(ans)

'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS MINE @luctivud ( UDIT GUPTA )
Link may be copy-pasted here if it's taken from other source.
DO NOT PLAGIARISE.
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''


n, c = map(int, input().split())
seconds = list(map(int, input().split()))

words = 1

for i in range(n - 1, 0, -1):
    if seconds[i] - seconds[i - 1] <= c:
        words += 1
    else:
        print(words)
        break


n, c = map(int, input().split())
seconds = list(map(int, input().split()))

words = 1

for i in range(n - 1, 0, -1):
    if seconds[i] - seconds[i - 1] <= c:
        words += 1
    else:
        break

print(words)


n, c = map(int, input().split())
seconds = reversed(map(int, input().split()))

words = 1

for i in range(n - 1):
    if seconds[i] - seconds[i + 1] <= c:
        words += 1
    else:
        print(words)
        break


a,b=map(int,input().split())
k=list(map(int,input().split()))
z=0
count=1
for i in k:
    if(z+b<i):
        count=1
    else:
        count+=1
    z=i
print(count)


a,b=map(int,input().split())
k=list(map(int,input().split()))
count=1
for i in range(1,a):
    if(k[i]-k[i-1]>b):
        count=1
    else:
        count+=1
    z=i
print(count)


a,b=map(int,input().split())
k=list(map(int,input().split()))
z=0
count=1
for i in k:
    if(i-z>b):
        count=1
    else:
        count+=1
    z=i
print(count)


ne,c=map(int,input().split(' '))
v=[int(x) for x in input().split(' ')]
minn = 0
count = 0
for i in range(1,ne):
    if(v[i]-v[i-1]<=c):
        count+=1
    else:
        count=1
    if(count>minn):
        minn=count
print(minn)


ne,c=map(int,input().split(' '))
v=[int(x) for x in input().split(' ')]
minn = 0
count = 1
if(ne==1):
    print('1')
    break
else:
    for i in range(1,ne):
        if(v[i]-v[i-1]<=c):
            count+=1
        else:
            count=1
        if(count>minn):
            minn=count
    print(minn)


ne,c=map(int,input().split(' '))
v=[int(x) for x in input().split(' ')]
minn = 0
count = 0
for i in range(ne-1,0,-1):
    if(v[i]-v[i-1]<=c):
        count+=1
    else:
        count=0
    if(count>minn):
        minn=count
print(minn+1)


ne,c=map(int,input().split(' '))
v=[int(x) for x in input().split(' ')]
minn = 0
count = 0
for i in range(0,ne):
    if(v[i]-v[i-1]<=c):
        count+=1
    else:
        count=1
    if(count>minn):
        minn=count
print(minn)


ne,c=map(int,input().split(' '))
v=[int(x) for x in input().split(' ')]
minn = 0
count = 1
if(ne==1):
    print('1')
else:
    for i in range(1,ne):
        if(v[i]-v[i-1]<=c):
            count+=1
        else:
            count=1
        if(count>minn):
            minn=count
    print(count)


ne,c=map(int,input().split(' '))
v=[int(x) for x in input().split(' ')]
minn = 0
count = 1
if(ne==1):
    print('1')
else:
    for i in range(1,ne):
        if(v[i]-v[i-1]<=c):
            count+=1
        else:
            count=1
        if(count>minn):
            minn=count
    print(minn)


ne,c=map(int,input().split(' '))
v=[int(x) for x in input().split(' ')]
minn = 0
count = 1
for i in range(1,ne):
    if(v[i]-v[i-1]<=c):
        count+=1
    else:
        count=1
    if(count>minn):
        minn=count
print(minn)


# import sys
# import time
# sys.stdin=open("utest.in","r")
# sys.stdout=open("utest.out","w")

# n=list(map(int,(input().split())))

# q=""
# for j in range(1,n[1]+1):
# 	q+="#"
# w=""
# for u in range(1,n[1]):
# 	w+="."
# w+="#"
# e=""
# for t in range(1,n[1]+1):
# 	e+="#"
# r="#"
# for i in range(1,n[1]):
# 	r+="."

# if n[0]:

# 	print(q)

n,c=map(int,input().split())
p=list(map(int,input().split()))
q=0
for i in range(n-1):
	if p[i+1]-p[i]<=c:
		q+=1
	else:
		q=1
print(q)


# import sys
# import time
# sys.stdin=open("utest.in","r")
# sys.stdout=open("utest.out","w")

# n=list(map(int,(input().split())))

# q=""
# for j in range(1,n[1]+1):
# 	q+="#"
# w=""
# for u in range(1,n[1]):
# 	w+="."
# w+="#"
# e=""
# for t in range(1,n[1]+1):
# 	e+="#"
# r="#"
# for i in range(1,n[1]):
# 	r+="."

# if n[0]:

# 	print(q)

n,c=map(int,input().split())
p=list(map(int,input().split()))
q=0
if n==1:
	print("1")
else:
	for i in range(n-1):
		if p[i+1]-p[i]<=c:
			q+=1
		else:
			q=1
	print(q)


# import sys
# import time
# sys.stdin=open("utest.in","r")
# sys.stdout=open("utest.out","w")

# n=list(map(int,(input().split())))

# q=""
# for j in range(1,n[1]+1):
# 	q+="#"
# w=""
# for u in range(1,n[1]):
# 	w+="."
# w+="#"
# e=""
# for t in range(1,n[1]+1):
# 	e+="#"
# r="#"
# for i in range(1,n[1]):
# 	r+="."

# if n[0]:

# 	print(q)

n,c=map(int,input().split())
p=list(map(int,input().split()))
q=1
if n==1:
	print("1")
else:
	for i in range(1,n):
		if p[i]-p[i-1]<=c:
			q+=1
		else:
			q=1
	print(q)


# import sys
# import time
# sys.stdin=open("utest.in","r")
# sys.stdout=open("utest.out","w")

# n=list(map(int,(input().split())))

# q=""
# for j in range(1,n[1]+1):
# 	q+="#"
# w=""
# for u in range(1,n[1]):
# 	w+="."
# w+="#"
# e=""
# for t in range(1,n[1]+1):
# 	e+="#"
# r="#"
# for i in range(1,n[1]):
# 	r+="."

# if n[0]:

# 	print(q)

n,c=map(int,input().split())
p=list(map(int,input().split()))
q=0
if n==1:
	print("1")
else:
	for i in range(1,n):
		if p[i]-p[i-1]<=c:
			q+=1
		else:
			q=1
	print(q)


a, b = map(int, input().split())
arr = [int(i) for i in input().split()]
summ = 0
for i in range(1, a):
    if i == a-1:
        sum += 1
    if arr[i] - arr[i-1] > b:
        summ = 0
    else:
        summ += 1
print(summ)


a, b = map(int, input().split())
arr = [int(i) for i in input().split()]
summ = 0
for i in range(1, a):
    if arr[i] - arr[i-1] > b:
        summ = 1
    else:
        summ += 1
print(summ)


a, b = map(int, input().split())
arr = [int(i) for i in input().split()]
summ = 0
for i in range(1, a):
    if arr[i] - arr[i-1] > b:
        summ = 0
    else:
        summ += 1
    if i == a - 1:
        summ += 1
print(summ)


a, b = map(int, input().split())
arr = [int(i) for i in input().split()]
summ = 0
for i in range(1, a):
    if i == a-1:
        summ += 1
    if arr[i] - arr[i-1] > b:
        summ = 0
    else:
        summ += 1
print(summ)


import sys
a, b = map(int, input().split())
arr = [int(i) for i in input().split()]
summ = 0
if a == 1:
    print(1)
    sys.exit(0)
for i in range(1, a):
    if arr[i] - arr[i-1] > b:
        summ = 0
    else:
        summ += 1
    if i == a - 1:
        summ += 1
print(summ)


n, c = map(int, input().split())
t = [int(x) for x in input().split()]
ans = 1
for i in range(1, n):
    if t[i] - t[i-1] <= c:
        ans += 1
    else:
        ans = 1
print(ans if n > 1 else 1)


n, c = map(int, input().split())
t = [int(x) for x in input().split()]
ans = 0
for i in range(1, n):
    if t[i] - t[i-1] <= c:
        ans += 1
    else:
        ans = 1
print(ans)


n, c = map(int, input().split())
t = [int(x) for x in input().split()]
ans = 0
for i in range(1, n):
    if t[i] - t[i-1] <= c:
        ans += 1
    else:
        ans = 1
print(ans if n > 1 else 1)


def screen(n,c,a):
    r=0
    for i in range(1,n):
        if a[i]-a[i-1]<=c:
            r+=1
        else:
            r=0
    print(r)

n,c=list(map(int,input().split()))
a=list(map(int,input().split()))
screen(n,c,a)


def screen(n,c,a):
    r=0
    for i in range(1,n):
        if a[i]-a[i-1]<=c:
            r+=1
        else:
            r=0
    print(r+1)

n,c=list(map(int,input().split()))
a=list(map(int,input().split()))
screen(n,c,a)


n,c=map(int,input().split())
l=input().split()
word=[l[0]]
for i in range(1,n):
	# print(l[i])
	if i<n and int(l[i])-int(l[i-1])<=c:
		word.append(l[i])
	else:
		word.clear()
		word.append(l[i])
print(len(word))


n,c=map(int,input().split())
l=input().split()
word=1
for i in range(1,n):
	# print(l[i])
	if i<n and int(l[i])-int(l[i-1])<c:
		word+=1
print(word)


from sys import stdin
n,c = map(int,stdin.readline().split())
arr = stdin.readline().split()
cnt = 1
for i in range(0,n-1):
    a = int(arr[i])
    b = int(arr[i+1])
    if( b - a <= c ):
        if(cnt != 0):
            cnt += 1
        else:
            cnt += 2
    elif(b-a > c and i == n-2):
        cnt = 1
    else:
        cnt = 0
print(cnt)


from sys import stdin
n,c = map(int,stdin.readline().split())
arr = stdin.readline().split()
cnt = 1
for i in range(0,n-1):
    a = int(arr[i])
    b = int(arr[i+1])
    if( b - a <= c ):
        if(cnt != 0):
            cnt += 1
        else:
            cnt += 2
    else:
        cnt = 0
print(cnt)


import sys

n,c = map(int,input().split())
arr = list(map(int,input().split()))

cnt = 1
for i in range(n-1,-1,-1):
    if i > 0 and arr[i] - arr[i-1] > c:
        break
    elif i > 0 and arr[i] - arr[i-1] <= c:
        cnt += 1

print(cnt)


user_input=input()
numbers=user_input.split(' ')
n=int(numbers[0])
c=int(numbers[1])
counter=1
previous=0

user_input=input()
time=user_input.split(' ')

for i in range(n):
    current=int(time[i])
    diff=current-previous
    if diff>c:
        counter=1
    else:
        counter+=1
    previous=current

print(counter)


user_input=input()
numbers=user_input.split(' ')
n=int(numbers[0])
c=int(numbers[1])
counter=1

user_input=input()
time=user_input.split(' ')

previous=int(time[0])

for i in range(1,n):
    current=int(time[i])
    diff=current-previous
    if diff>c:
        counter=1
    else:
        counter+=1
    previous=current

print(counter)


user_input=input()
numbers=user_input.split(' ')
n=int(numbers[0])
c=int(numbers[1])
counter=1
previous=0

user_input=input()
time=user_input.split(' ')

for i in range(1,n):
    current=int(time[i])
    diff=current-previous
    if diff>c:
        counter=1
    else:
        counter+=1
    previous=current

print(counter)


user_input=input()
numbers=user_input.split(' ')
n=int(numbers[0])
c=int(numbers[1])
counter=0
previous=0

user_input=input()
time=user_input.split(' ')

for i in range(n):
    current=int(time[i])
    diff=current-previous
    if diff>c:
        counter=0
    else:
        counter+=1
    previous=current

print(counter+1)


user_input=input()
numbers=user_input.split(' ')
n=int(numbers[0])
c=int(numbers[1])
counter=1

user_input=input()
time=user_input.split(' ')

previous=time[0]

for i in range(1,n):
    current=int(time[i])
    diff=current-previous
    if diff>c:
        counter=1
    else:
        counter+=1
    previous=current

print(counter)


n,k = list(map(int,input().split()))
arr = list(map(int,input().split()))
ctr=[]
for i in range(1,n):
    if arr[i]-arr[i-1]>k:
        ctr.append(i)
if len(ctr)>0:
    print(n-ctr[-1])
else:
    print(n)


n,k = list(map(int,input().split()))
arr = list(map(int,input().split()))
ctr=[]
for i in range(1,n):
    if arr[i]-arr[i-1]>k:
        ctr.append(i)
print(n-ctr[-1])


n,k = list(map(int,input().split()))
arr = list(map(int,input().split()))
ctr=[]
for i in range(1,n):
    if arr[i]-arr[i-1]>k:
        ctr.append(i)
if len(ctr)>0:
    print(n-ctr[-1])
elif n==1 and arr[0]>5:
    print(0)
elif n==1 and arr[0]<=5:
    print(1)
elif len(ctr)==0:
    print(n)


n=list(map(int,input().split()))
n1=input().split()
lst=[]
if(len(n1)!=1):
    for i in range(n[0]-1):
        if((int(n1[i+1])-int(n1[i]))<=n[1]):
            lst.append(n1[i])
        else:
            lst=[]
    if(n1[-2] in n1):
        lst.append(n1[-1])
    print(len(lst))
else:
    print('1')


n=list(map(int,input().split()))
n1=input().split()
lst=[]
for i in range(n[0]-1):
    if((int(n1[i+1])-int(n1[i]))<=n[1]):
        lst.append(n1[i])
    else:
        lst=[]
if(n1[-2] in n1):
    lst.append(n1[-1])
print(len(lst))


n,p=map(int,input().split())
l=list(map(int,input().split()))
k=1
for i in range(1,n) :
    if l[i]-l[i-1]>p :
        k=0
    else :
        k=k+1
if n!=1 :
    k=k+1
print(k)


n,p=map(int,input().split())
l=list(map(int,input().split()))
k=1
for i in range(1,n) :
    if l[i]-l[i-1]>p :
        k=0
    else :
        k=k+1
if k+1!=n :
    k=k+1
print(k)


n,p=map(int,input().split())
l=list(map(int,input().split()))
k=1
for i in range(1,n) :
    if l[i]-l[i-1]>p :
        k=0
    else :
        k=k+1
    if k+1!=n :
        k=k+1
print(k)


n,p=map(int,input().split())
l=list(map(int,input().split()))
k=1
for i in range(1,n) :
    if l[i]-l[i-1]>p :
        k=1
    else :
        k=k+1
print(k)


n,p=map(int,input().split())
l=list(map(int,input().split()))
k=1
for i in range(1,n) :
    if l[i]-l[i-1]>p :
        k=0
    else :
        k=k+1
print(k+1)


n,c=map(int,input().split())
l=list(map(int,input().split()))
s=0
if len(l)==1:
  s=1
else:
  for i in range(1,len(l)):
      if (l[i]-l[i-1])<=c:
          s+=1
      else:
          s=1
print(s)


n,c=map(int,input().split())
l=list(map(int,input().split()))
s=0
for i in range(1,len(l)):
  if (l[i]-l[i-1])<=c:
    s+=1
  else:
    s=1
print(s)


n,c=map(int,input().split())
l=list(map(int,input().split()))
s=0
v=0
for i in range(len(l)):
      if (l[i]-v)<=c:
          s+=1
      else:
          s=1
      v=l[i]
print(s)


count_ch, timeout = map(int, input().split())
time = list(map(int, input().split()))
calc = 1
for i in range(1, count_ch):
    a = time[i-1]
    b = time[i]
    if b - a > timeout:
        calc = 0
    calc += 1
print(calc)


n, m, L, s, t = map(int, input().split())
s1 = s
t1 = t
x = []
summa = 0
for i in range(m):
    a = list(map(int, input().split()))
    x.append(a)
    if s == a[0]:
        s = a[1]
    if t == a[1]:
        t = a[0]

print(x)


count_ch, timeout = map(int, input().split())
time = list(map(int, input().split()))
calc = 0
for i in range(1, count_ch):
    a = time[i-1]
    b = time[i]
    if b - a > timeout:
        calc = 0
    calc += 1
print(calc)


n , c = map(int,input().split())
l = list(map(int,input().split()))
ans = 1
ma = 0
for f in range( 1 , n ) :
    if l[f] - l[f-1] <= c :
        ans += 1
        if ans > ma : ma = ans
    else :
        ans = 1
print(ma)


n , c = map(int,input().split())
l = list(map(int,input().split()))
ans = 1
ma = 1
for f in range( 1 , n ) :
    if l[f] - l[f-1] <= c :
        ans += 1
        if ans > ma : ma = ans
    else :
        ans = 1
print(ma)


n , c = map(int,input().split())
l = list(map(int,input().split()))
if l[0] < c :
    ans = 1
    for f in range( 1 , n ) :
        if l[f] - l[f-1] <= c : ans += 1
        else : break
    print(ans)
else : print(0)


n , c = map(int,input().split())
l = list(map(int,input().split()))
ans = 1
for f in range( 1 , n ) :
    if (l[f] - l[f-1]) <= c :
        ans += 1
    else :
        ans = 1
print(ans)


n, c = [int(s) for s in input().split()]
sec = [int(s) for s in input().split()]

count = 1
for i in range(n-1):
    if sec[i+1] - sec[i] <= c:
        count += 1
    else:
        count = 1

print(count)


n, c = [int(s) for s in input().split()]
sec = [int(s) for s in input().split()]

count = 0
if sec[0] <= c:
    count += 1
    for i in range(n-1):
        if sec[i+1] - sec[i] <= c:
            count += 1
        else:
            count = 1
else:
    for i in range(n-1):
        if sec[i+1] - sec[i] <= c:
            count += 1
        else:
            break
print(count)


#CRAZY COMPUTER(716A)

t,c = map(int,input().split())

l = list(map(int,input().split()))
cnt = 0

for i in range(1,len(l)):
    if l[i] - l[i-1] <= c:
        cnt += 1
    else:
        cnt = 1
print(cnt)


#CRAZY COMPUTER(716A)

t,c = map(int,input().split())

l = list(map(int,input().split()))
cnt = 1

for i in range(1,len(l)):
    if l[i] - l[i-1] <= c:
        cnt += 1
    else:
        cnt = 1
print(cnt)


#CRAZY COMPUTER(716A)

t,c = map(int,input().split())

l = list(map(int,input().split()))
cnt = 0

for i in range(len(l)-1):
    if abs(l[i] - l[i+1]) <= c:
        cnt += 1
    else:
        cnt = 1
print(cnt)


u=input().split()
n=int(u[0])
c=int(u[1])
res=0
b=list(map(int,input().split()))
for i in range(n):
    if i==0:
        res+=1
    elif b[i]-b[i-1]>c:
        res=0
        res+=1
    else:
        res+=1
print(res)


u=input().split()
n=int(u[0])
c=int(u[1])
res=1
b=list(map(int,input().split()))
for i in range(n):
    if i==0:
        res+=1
    elif b[i]-b[i-1]>c:
        res=0
        res+=1
    else:
        res+=1
print(res)


n,c=map(int,input().split())
t=list(map(int,input().split()))
for i in range(n):
    if t[::-1][i]-t[::-1][i+1]>c:break
print(i+1)


n,c=map(int,input().split())
t=list(map(int,input().split()))
ans=k=0
for i in t:
    ans=1+ans*(i-k<=c)
    k=i
print(ans)


n,c=map(int,input().split())
t=list(map(int,input().split()))[::-1]
if n==1:
    print(1)
else:
    for i in range(n):
        if t[i]-t[i+1]>c:break
    print(i+1)


n,c=map(int,input().split())
t=list(map(int,input().split()))
if n==1:
    print(1)
else:
    for i in range(n):
        if t[::-1][i]-t[::-1][i+1]>c:break
    print(i+1)


s1 = input().split()
n = int(s1[0])
c = int(s1[1])
s2 = input().split()
k = 1
for i in range(0, n-1):
    if (int(s2[i+1]) - int(s2[i])) > c:
        k = 1
    else:
        k+=1
print(k)


s1 = input().split()
n = int(s1[0])
c = int(s1[1])
s2 = input().split()
k = 1
for i in range(0, n-1):
    if (int(s2[i+1]) - int(s2[i])) > c:
        k = 1
    elif:
        k+=1
print(k)


s1 = input().split()
n = int(s1[0])
c = int(s1[1])
s2 = input().split()
k = 0
if int(s2[0])<=c:
    k = 1
for i in range(0, n-1):
    if (int(s2[i+1]) - int(s2[i])) > c:
        k = 1
    else:
        k+=1
print(k)


def main():
    c, a, j = int(input().split()[1]), 0, 0
    for i, b in enumerate(map(int, input().split())):
        j, a = i if b - a > c else j, b
    print(i - j + 1)

if __name__ == '__main__':
    main()


def main():
    b, c = 0, int(input().split()[1]),
    for i, a in enumerate(map(int, input().split()[::-1])):
        if b - a > c:
            break
        b = a
    print(i)

if __name__ == '__main__':
    main()


def main():
    b, c = 0, int(input().split()[1]),
    for i, a in enumerate(map(int, input().split()[::-1])):
        if b - a > c:
            break
        b = a
    print(i or 1)

if __name__ == '__main__':
    main()


def main():
    b, c = 0, int(input().split()[1]),
    for i, a in enumerate(map(int, input().split()[::-1])):
        if b - a > c:
            break
        b = a
    else:
        i += 1
    print(i or 1)

if __name__ == '__main__':
    main()


import sys
import os

def changeStdioToFile():
    path = os.path.dirname(os.path.abspath(__file__))
    sys.stdin = open(f'{path}/input.txt', 'r')
    sys.stdout = open(f'{path}/output.txt', 'w')

def checkPermutation(a):
    s = set()
    for num in a:
        s.add(num)
    if max(s) == max(a) and len(s) == len(a) and min(s) == 0: return True
    else: return False

#changeStdioToFile()
t = int(input())
for _ in range(t):
    n = int(input())
    a = [int(x) for x in input().split()]
    if n % 2 != 0:
        for i in range(101):
            if i not in a: print(i); break
        continue
    if checkPermutation(a):
        print(n + 1)
        continue
    a.sort()
    b = list()
    c = list()
    for num in a:
        if len(b) == len(a):
            c.append(num)
            continue
        if num not in b and len(b) < len(a):
            b.append(num)
        else:
            if len(c) < len(a): c.append(num)
            else: b.append(num)
    res = 0
    b.sort()
    c.sort()
    for i in range(101):
        if i not in b:
            res += i
            break
    for i in range(101):
        if i not in c:
            res += i
            break
    print(res)


import sys
import os

def changeStdioToFile():
    path = os.path.dirname(os.path.abspath(__file__))
    sys.stdin = open(f'{path}/input.txt', 'r')
    sys.stdout = open(f'{path}/output.txt', 'w')

def checkPermutation(a):
    s = set()
    for num in a:
        s.add(num)
    if max(s) == max(a) and len(s) == len(a) and min(s) == 0: return True
    else: return False

# changeStdioToFile()
t = int(input())
for _ in range(t):
    n = int(input())
    a = [int(x) for x in input().split()]
    if n % 2 != 0:
        for i in range(101):
            if i not in a: print(i); break
        continue
    if checkPermutation(a):
        print(n)
        continue
    a.sort()
    b = list()
    c = list()
    for num in a:
        if len(b) == len(a):
            c.append(num)
            continue
        if num not in b and len(b) < len(a):
            b.append(num)
        else:
            if len(c) < len(a): c.append(num)
            else: b.append(num)
    res = 0
    b.sort()
    c.sort()
    for i in range(101):
        if i not in b:
            res += i
            break
    for i in range(101):
        if i not in c:
            res += i
            break
    res1 = 0
    for i in range(101):
        if i not in a:
            res1 = i
            break
    print(max(res, res1))


import sys
import os
from collections import Counter

def changeStdioToFile():
    path = os.path.dirname(os.path.abspath(__file__))
    sys.stdin = open(f'{path}/input.txt', 'r')
    sys.stdout = open(f'{path}/output.txt', 'w')

t = int(input())
for _ in range(t):
    n = int(input())
    c = sorted(map(int, input().split()))
    a = [-1]
    b = [-1]
    x = y = 0
    while c:
        if c[0] == a[-1]:
            b.append(c[0])
        else:
            a.append(c[0])
        c = c[1:]

    a = Counter(a)
    b = Counter(b)

    for i in range(100):
        if a.get(i, 0) == 0:
            x = i
            break
    for i in range(100):
        if b.get(i, 0) == 0:
            y = i
            break
    print(x + y)


import sys
import os
from collections import Counter

def changeStdioToFile():
    path = os.path.dirname(os.path.abspath(__file__))
    sys.stdin = open(f'{path}/input.txt', 'r')
    sys.stdout = open(f'{path}/output.txt', 'w')

#changeStdioToFile()
t = int(input())
for _ in range(t):
    n = int(input())
    c = sorted(map(int, input().split()))
    a = [-1]
    b = [-1]
    x = y = 0
    while c:
        if c[0] == a[-1]:
            b.append(c[0])
        else:
            a.append(c[0])
        c = c[1:]

    a = Counter(a)
    b = Counter(b)

    for i in range(101):
        if a.get(i, 0) == 0:
            x = i
            break
    for i in range(101):
        if b.get(i, 0) == 0:
            y = i
            break
    print(x + y)


t=int(input())
for _ in range(t):
    n=int(input())
    a=sorted(list(map(int,input().split())))
    list1=[]
    list2=[]
    for items in a :
        if items not in list1:
            list1.append(items)
        elif items not in list2:
            list2.append(items)
    x=-1
    for i in range(0,len(list1)):
        x+=1
        if list1[i]!=x:
            break
    y=-1
    if len(list2)==0:
        y=0
    else:
        for i in range(0,len(list1)):
            y+=1
            if list1[i]!=y:
                break
        print(x+y)


t=int(input())
for _ in range(t):
    n=int(input())
    a=sorted(list(map(int,input().split()))
    list1=[]
    list2=[]
    for items in a :
        if items not in list1:
            list1.append(items)
        elif items not in list2:
            list2.append(items)
    x=-1
    for i in range(0,len(list1)):
        x+=1
        if list1[i]!=x:
            break
    y=-1
    for i in range(0,len(list1)):
        y+=1
        if list1[i]!=y:
            break
    print(x+y)


t=int(input())
for _ in range(t):
    n=int(input())
    a=sorted(list(map(int,input().split())))
    list1=[]
    list2=[]
    for items in a :
        if items not in list1:
            list1.append(items)
        elif items not in list2:
            list2.append(items)
    x=-1
    for i in range(0,len(list1)):
        x+=1
        if list1[i]!=x:
            break
    y=-1
    for i in range(0,len(list1)):
        y+=1
        if list2[i]!=y:
            break
    print(x+y)


t=int(input())
for _ in range(t):
    n=int(input())
    a=list(map(int,input().split()))
    list1=[]
    list2=[]
    for items in a :
        if items not in list1:
            list1.append(items)
        elif items not in list2:
            list2.append(items)
    x=-1
    for i in range(0,len(list1)):
        x+=1
        if list1[i]!=x:
            break
    y=-1
    for i in range(0,len(list1)):
        y+=1
        if list1[i]!=y:
            break
    print(x+y)


t=int(input())
for _ in range(t):
    n=int(input())
    a=sorted(list(map(int,input().split())))
    list1=[]
    list2=[]
    for items in a :
        if items not in list1:
            list1.append(items)
        elif items not in list2:
            list2.append(items)
    x=-1
    for i in range(0,len(list1)):
        x+=1
        if list1[i]!=x:
            break
    y=-1
    for i in range(0,len(list1)):
        y+=1
        if list1[i]!=y:
            break
    print(x+y)


# cook your dish here
t=int(input())
for _ in range(t):
    n=int(input())
    a=sorted(list(map(int,input().split())))
    list1=[]
    list2=[]
    for items in a :
        if items not in list1:
            list1.append(items)
        elif items not in list2:
            list2.append(items)
    x=-1
    for i in range(0,len(list1)):
        x+=1
        if list1[i]!=x:
            break
    if i==len(list1)-1:
        if x==list1[i]:
            x+=1
    y=-1
    if len(list2)==0:
        y=0
    else:
        for i in range(0,len(list2)):
            y+=1
            if list2[i]!=y:
                break
    if i==len(list2)-1:
        if y==list2[i]:
            y+=1
    print(x+y)


t=int(input())
for _ in range(t):
    n=int(input())
    a=sorted(list(map(int,input().split())))
    list1=[]
    list2=[]
    for items in a :
        if items not in list1:
            list1.append(items)
        elif items not in list2:
            list2.append(items)
    x=-1
    for i in range(0,len(list1)):
        x+=1
        if list1[i]!=x:
            break
    y=-1
    if len(list2)==0:
        y=0
    else:
        for i in range(0,len(list1)):
            y+=1
            if list2[i]!=y:
                break
    print(x+y)


t=int(input())
for _ in range(t):
    n=int(input())
    a=list(map(int,input().split())
    list1=[]
    list2=[]
    for items in a :
        if items not in list1:
            list1.append(items)
        elif items not in list2:
            list2.append(items)
    x=-1
    for i in range(0,len(list1)):
        x+=1
        if list1[i]!=x:
            break
    y=-1
    for i in range(0,len(list1)):
        y+=1
        if list1[i]!=y:
            break
    print(x+y)


t=int(input())
for i in range(t):
    n=int (input())
    s=list(map(int,input().split()))
    s.sort()
    a=b=0
    for i in s:
        if a==i:
            a+=1
        if b==i:
            b+=1
    print(a+b)


t=int(input())
for i in range(t):
    n=int (input())
    s=list(map(int,input().split()))
    r=set(s)
    l=len(r)
    if n==l and n%2==0:
        print(0)
    elif n>l:
        print(l+1)
    else:
        print(l)


t=int(input())
for i in range(t):
    n=int (input())
    s=list(map(int,input().split()))
    s.sort()
    a,b=0,0
    for i in s:
        if a==i:
            a+=1
        elif b==i:
            b+=1
    print(a+b)


from collections import Counter

T = int(input())

for t in range(T):
    _ = input()
    a = [int(x) for x in input().split()]
    a.sort()
    freq = Counter(a)
    # print(freq)
    onerun = -1
    tworun = -1
    for c in range(0, a[-1]+1):
        if freq[c] == 1:
            onerun = c
        elif freq[c] >= 2:
            if tworun == c - 1:
                tworun = c
            onerun = c
        else:
            break

    # print(onerun, tworun)
    print(onerun+1 + tworun+1)