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

#define TASK "capital"

void solve()
{
	int a, n;
	cin >> a >> n;

	vector <int> ans(n);
	for (int i = 0; i < n && a > 0; i++) {
		int cur = min(9, a);
		ans[i] += cur;
		a -= cur;
	}

	if (a > 0) {
		cout << "-1\n";
	} else {
		for (int i = 0; i < n; i++) cout << ans[i]; cout << endl;
	}
}

int main()
{
	freopen(TASK ".in", "r", stdin);
	freopen(TASK ".out", "w", stdout);
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	solve();
	return 0;
}
