using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (n, k) = (c[0], c[1]); WriteLine(LPS(n, k)); } static string LPS(int n, int k) { if (k == 1) { if (n == 1) return "0"; } else if (k == 2) { if (n <= 4) return "0011"[0..n]; } else if (k == 3) { if (n < 8) return "00010111"[0..n]; } else { var ans = new char[n]; for (var i = 0; i < k; ++i) ans[i] = '1'; for (var i = k; i < n; ++i) ans[i] = "001101"[(i - k) % 6]; return string.Concat(ans); } return "-1"; } }