#include"bits/stdc++.h" using namespace std; #define REP(k,m,n) for(int (k)=(m);(k)<(n);(k)++) #define rep(i,n) REP((i),0,(n)) using ll = long long; using pii = pair; using pll = pair; using tp3 = tuple; //using Mat = vector>; constexpr int INF = 1 << 28; constexpr ll INFL = 1ll << 60; constexpr int dh[4] = { 0,1,0,-1 }; constexpr int dw[4] = { -1,0,1,0 }; bool isin(const int H, const int W, const int h, const int w) { return 0 <= h && h < H && 0 <= w && w < W; } // ============ template finished ============ using Mat = array, 2>; int main() { ll N, M; cin >> N >> M; vector A(N); rep(i, N)cin >> A[i]; vector dp(N + 1); for (auto& mat : dp)rep(i, 2)rep(j, 2)mat[i][j] = INFL; rep(i, 2)rep(j, 2)dp.back()[i][j] = 0; for (int land = N - 1; land >= 0; --land) { // 1つ残っている = false { // 先手 = true dp[land][false][true] = dp[land + 1][true][false] + 1 - M; // 後手 = false dp[land][false][false] = dp[land + 1][true][true] - (1 - M); } // 全て残っている = true { // 先手 = true dp[land][true][true] = max( A[land] > 1 ? dp[land][false][false] + A[land] - 1 : -INFL, // 1つ残して取る dp[land + 1][true][false] + A[land] - M // 全部取る ); // 後手 = false dp[land][true][false] = min( A[land] > 1 ? dp[land][false][true] - (A[land] - 1) : INFL, // 1つ残して取る dp[land + 1][true][true] - (A[land] - M) // 全部取る ); } } auto value = dp.front()[true][true]; cout << (value > 0 ? "First" : "Second") << endl; return 0; }