#include using ll = long long; using namespace std; #define rep(i,n) for(int i=0, i##_len=(int)(n); i=0;i--) #define rreps(i,n) for(int i=((int)(n));i>0;i--) #define repi(i,x) for(auto i=(x).begin(),i##_fin=(x).end();i!=i##_fin;i++) #define all(x) (x).begin(), (x).end() #define F first #define S second #define mp make_pair #define mt make_tuple #define pb push_back #define eb emplace_back string solve(bool a) { return ((a) ? "Yes" : "No"); } typedef vector Vi; typedef vector VVi; typedef pair Pi; typedef vector VPi; typedef vector V; typedef vector VV; typedef pair P; typedef vector

VP; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1;} return 0;} template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1;} return 0;} template ostream& operator<<(ostream& os, const pair& p) { os << "(" << p.first << "," << p.second << ")"; return os; } template ostream& operator<<(ostream& os, const vector& v) { os << "{"; rep(i, v.size()) { if (i) os << ","; os << v[i]; } os << "}"; return os; } template istream& operator>>(istream& is, pair& p) { is >> p.first >>p.second ; return is; } template istream& operator>>(istream& is, vector& v) { rep(i, v.size()) { is >> v[i]; } return is; } template class modint { private: long long val; public: constexpr modint(long long v = 0) noexcept : val(v % MOD) { if (val < 0) val += MOD; } constexpr int getmod() { return MOD;} constexpr modint operator-() const noexcept { return val ? MOD - val : 0;} constexpr modint operator+(const modint& r) const noexcept {return modint(*this) += r;} constexpr modint operator-(const modint& r) const noexcept {return modint(*this) -= r;} constexpr modint operator*(const modint& r) const noexcept {return modint(*this) *= r;} constexpr modint operator/(const modint& r) const noexcept {return modint(*this) /= r;} constexpr modint& operator+=(const modint& r) noexcept { val += r.val; if (val >= MOD) val -= MOD; return *this; } constexpr modint& operator-=(const modint& r) noexcept { val -= r.val; if (val < 0) val += MOD; return *this; } constexpr modint& operator*=(const modint& r) noexcept { val = val * r.val % MOD; return *this; } constexpr modint& operator/=(const modint& r) noexcept { long long a = r.val, b = MOD, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } val = val * u % MOD; if (val < 0) val += MOD; return *this; } constexpr bool operator==(const modint& r) const noexcept {return this->val == r.val;} constexpr bool operator!=(const modint& r) const noexcept {return this->val != r.val;} constexpr bool operator<(const modint& r) const noexcept {return this->val < r.val;} constexpr bool operator>(const modint& r) const noexcept {return this->val > r.val;} constexpr bool operator<=(const modint& r) const noexcept {return this->val < r.val or this->val == r.val;} constexpr bool operator>=(const modint& r) const noexcept {return this->val > r.val or this->val == r.val;} friend constexpr istream& operator>>(istream& is,modint& x) noexcept { ll t; is >> t; x=modint(t); return is; } friend constexpr ostream& operator<<(ostream& os,const modint& x) noexcept {return os << x.val;} friend constexpr modint modpow(const modint& a,long long n) noexcept { if (n == 0) return 1; auto t = modpow(a, n / 2); t = t * t; if (n & 1) t = t * a; return t; } }; const long long INFLL = 1LL<<60; const int INF = 1<<30; const double PI=acos(-1); int main(){ int k,n; int ans=0; cin >>k>>n; Vi x(n); cin>>x; vector>dp(k+1,0LL); dp[0]=1LL; for(int i=0;i=k){ break; } dp[i+x[j]]+=dp[i]; } } cout<