#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ ll N, K, S, T, mx, u, ans=0; cin >> N >> K; string s; vector b(K+1); b[0] = 1; for (int i=1; i<=K; i++) b[i] = b[i-1] * 5; mx = b[K]; vector p(mx), q(mx); for (int i=0; i> s; S = 0; for (int j=0; j=0; i--){ if (q[i] == 0) continue; for (int j=0; j 0){ T = i - b[j]; q[T] += 1; } } } for (int i=0; i 1) ans++; } cout << ans << endl; return 0; }