#include #define pt(sth) cout << sth << "\n" #define itr(x,c) for(auto x=c.begin();x!=c.end();x++) #define ritr(x,c) for(auto x=c.rbegin();x!=c.rend();x++) #define all(a) (a.begin()),(a.end()) #define rall(a) (a.rbegin()),(a.rend()) using namespace std; #include using namespace atcoder; typedef long long ll; typedef pair pll; templatebool chmax(T &a, const T &b) {if(abool chmin(T &a, const T &b) {if(b>a[i]; typedef vector v1d; typedef vector v2d; typedef vector v3d; typedef vector v4d; #include namespace mp=boost::multiprecision; int main(void) { ll i,j,k; /* ll N;cin>>N; v1d a(N); for(i=0;i>a[i]; */ ll N,K;cin>>N>>K; v1d a(N); for(i=0;i>a[i]; set st; for(ll S=0;S<1<>i&1){ s*=a[i]; t+=a[i]; } st.insert(s);st.insert(t); } pt(st.size()); }