// https://atcoder.jp/contests/abc182/tasks/abc182_f

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

#define REP(i,n)   for(int i=0; i<(int)(n); i++)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); i++)
#define DEBUG 1
#if DEBUG
  #define _GLIBCXX_DEBUG
  #define DUMP(a) REP(_i, a.size()) cout << a[_i] << (_i + 1 == a.size() ? "\n" : " ")
  #define DUMP2D(b) REP(_j, b.size()) DUMP(b[_j]); cout << endl
#else
  #define DUMP(a)
  #define DUMP2D(b)
#endif

const int N_MAX = 50;
const ll A_N_MAX = 1e15;
const ll X_MAX = 1e15;
const ll INF = 2e15;

int N;
ll X;
vector<ll> A;

vector<ll> C, Y;
vector<vector<ll>> dp;

int main() {
  cin >> N >> X;
  A = vector<ll>(N);
  REP(i, N) cin >> A[i];

  C = vector<ll>(N);
  Y = vector<ll>(N);
  ll tmp = X;
  REP(i, N - 1) {
    C[i] = A[i + 1] / A[i];
    Y[i] = tmp % C[i];
    tmp /= C[i];
  }
  C[N - 1] = INF;
  Y[N - 1] = tmp;

  // DUMP(C);
  // DUMP(Y);

  dp = vector<vector<ll>>(N + 1, vector<ll>(2));
  dp[0][0] = 1; dp[0][1] = 0;
  REP(i, N) {
    dp[i + 1][0] += dp[i][0];
    if (Y[i] < C[i] - 1) dp[i + 1][0] += dp[i][1];
    if (i + 1 < N) {
      dp[i + 1][1] += dp[i][1];
      if (Y[i] > 0) dp[i + 1][1] += dp[i][0];
    }
  }

  // DUMP2D(dp);

  ll ans = dp[N][0];
  cout << ans << endl;
}


#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<unordered_map>
#include<vector>
#include<unordered_set>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<string>
//Required Headers
using namespace std;

#define PI 3.1415926535897932384626
#define sp(x,y)                     fixed<<setprecision(y)<<x
#define mk(arr,n,type)              type *arr=new type[n]; // dynamic allocation of memory
#define del(arr)                    delete []arr;           // deletion of allocated memory
const int mod = 1'000'000'007;
const int inf = 1e9 + 5;

//for loops

#define fo(i, n) for(i=0; i<n; i++) 
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define fo2(i, n,t) for(i=0; i<n; i+=t) 

//essentials

#define tc(t)               ll t;ll i; cin>>t; fo(i,t)
#define ll long long

//STL

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define vbe(x) x.begin(), x.end()
#define sortvbe(x) sort(vbe(x))
#define setit(it, a) for(auto it = a.begin(); it != a.end(); it++)
typedef map<int,int>    mii;
typedef map<ll,ll>      mll;
typedef pair<int, int>  pii;
typedef pair<ll, ll>  pl;
typedef vector<int>   vi;
typedef vector<ll>    vl;
typedef vector<pii>   vpii;
typedef vector<pl>    vpl;
typedef vector<vi>    vvi;
typedef vector<vl>    vvl;
typedef set<int>        si;
typedef set<ll>         sl;


//inputs

#define ci(x)     cin>>x;
#define ci2(x,y)    cin>>x>>y;

//template<typename... T>
//void read(T&... args) {
//  ((cin >> args), ...);
//}

//outputs

#define pi(x)     cout<<x;
#define pinl(x)     cout<<x<<endl;

//template<typename... T>
//void write(T&&... args) { //rvalue reference is new to C++ 
//  ((cout << args << " "), ...);
//}
ll m=1000000007;
//some imp func

inline int gcd(int a,int b) {if (a==0) return b; else return gcd(b%a,a);}
inline void take_input(int A[],int n){for(int i=0;i<n;i++){ cin>>A[i];}}
inline void show(int *A,int n){for(int i=0;i<n;i++){cout<<A[i]<<" ";}cout<<endl;}
inline bool sortbysec(const pair<int,int> &a, const pair<int,int> &b) { return (a.second < b.second); } 
inline bool sortbysecdesc(const pair<int,int> &a, const pair<int,int> &b) { return (a.second > b.second); } 
inline void swap(int &a,int &b){int temp=a;a=b;b=temp;}
inline void initialise(int A[],int n,int k){for(int i=0;i<n;i++){A[i]=k;}}
inline void vect_input(vector<int>&v,int n){for(int i=0;i<n;i++){int input;cin>>input;v.pb(input);}}
inline int modulo(int a,int b){return (b+(a%b))%b;} 
inline int getascii(char ch){return (int)ch;}
inline ll expo(ll e,ll p){if(p==0)return (1);ll ans=expo(e,p/2);ans=((ans%m)*(ans%m))%m;if(p%2!=0)ans=((e%m)*(ans%m))%m;return ans%m;}
inline ll com_wd_m(ll n,ll r,ll m){ll p=1,d=1;if(r==0 or r==n )return(1);if(r==1 )return (n%m);r=min(r,n-r);for(ll i=0;i<r;i++){p=((p%m)*((n%m)-(i%m))%m)%m;p=((p%m)*(expo((i+1),m-2)%m))%m;}return (p%m);}

template<typename T>
void show_vect(vector<T> v){for(int i=0;i<v.size();i++){cout<<v[i]<<" ";}cout<<endl;}
template<typename T>
void vect_input(vector<T>&v,T n){for(int i=0;i<n;i++){cin>>v[i];}}
int fact(int n) { return (n==1 || n==0) ? 1: n * fact(n - 1);  } 



//debugging

#define deb(x) cout << #x << " = " << x << endl; //to check the values
#define deb2(x, y) cout << #x << " = " << x << "," << #y << " = " << y << endl;

void A_A()
{
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    freopen("input.in", "r", stdin);
    freopen("output.in", "w", stdout);
    freopen("error.in","w",stderr);
    #endif
}
ll num;

void solve(){
  ll i,n,j;
  cin>>n;
  vl a(n);
  ll s=0,mx=0;
  long double s2=0;
  fo(i,n){
    cin>>a[i];
    s+=abs(a[i]);
    s2+=a[i]*a[i];
    mx=max(abs(a[i]),mx);
  }
  ll x=15;
  long double ans=sqrt(s2);
  cout<<s<<endl;
  cout << fixed;
  cout<<setprecision(15)<<ans<<endl;
  cout<<mx<<endl;

}
int main(){
   A_A();
  // tc(t){
    solve();
  // }
  return 0;
}
/*

*/           