#include #define rep(i,n) for(int i = 0; i < (n); ++i) #define srep(i,s,t) for (int i = s; i < t; ++i) #define drep(i,n) for(int i = (n)-1; i >= 0; --i) using namespace std; typedef long long int ll; typedef pair P; #define yn {puts("YES");}else{puts("NO");} #define MAX_N 200005 int main() { int n, k; cin >> n >> k; if(k*2>=n){ rep(i,k) cout << '0'; rep(i,n-k) cout << '1'; cout << endl; return 0; } if(k == 3){ cout << -1 << endl; return 0; } string s; rep(i,k-2) s += '0'; rep(i,k-2) s += '1'; s += '0'; s += '1'; string ans; int m = s.size(); rep(i,n) ans += s[i%m]; cout << ans << endl; return 0; }