Problem:
Problem Statement

There are N piles of candies on the table. The piles are numbered 1 through N. At first, pile i contains a_i candies.

Snuke and Ciel are playing a game. They take alternating turns. Snuke goes first. In each turn, the current player must perform one of the following two operations:

Choose a pile with the largest number of candies remaining, then eat all candies of that pile.

From each pile with one or more candies remaining, eat one candy.

The player who eats the last candy on the table, loses the game. Determine which player will win if both players play the game optimally.

Constraints

1≤N≤10^5

1≤a_i≤10^9

Input

The input is given from Standard Input in the following format:

N
a_1 a_2 … a_N

Output

If Snuke will win, print First. If Ciel will win, print Second.

Sample Input 1

2
1 3

Sample Output 1

First

At the beginning of the game, pile 2 contains the most candies. If Snuke eats all candies of this pile, Ciel has no choice but to eat the last candy.

Sample Input 2

3
1 2 1

Sample Output 2

First

If Snuke eats one candy from each pile, Ciel is again left with the last candy.

Sample Input 3

3
1 2 3

Sample Output 3

Second

Solution in C++14 (GCC 5.4.1) (judge verdict: Runtime Error)

#include <iostream>
#include <algorithm>
using namespace std;

long long n, a[(1<<20)];

pair < long long, long long > proj ( long long y, long long x ) {
    long long c = min( x, y );
    return make_pair( y-c, x-c );
}

void printS( long long c ) {
    if ( c%2 ) { cout << "First\n"; }
    else { cout << "Second\n"; }
}

int main () {
    cin >> n;
    for ( long long i = 0 ; i < n ; i ++ ) {
        cin >> a[i];
    }
    sort( a, a+n );
    reverse( a, a+n );
    int szX, szY;

    for ( long long i = 0 ; i < n ; i ++ ) {
        if ( i == n-1 || a[i+1] < a[i] ) {
            pair < long long , long long > c = proj( a[i]-1, i );
            if ( c.first == 0 && c.second == 0 ) { cout << "Second\n"; return 0; }
        }
    }

    long long t = -1, r = -1;

    for ( long long i = 0 ; i < n ; i ++ ) {
        if ( i == n-1 || a[i+1] < a[i] ) {
            if ( proj( a[i]-1, i ).first == 0 ) { r = proj( a[i]-1, i ).second; szY = a[i]; break; }
        }
    }
    for ( long long i = n-1 ; i >= 0 ; i -- ) {
        if ( i == n-1 || a[i+1] < a[i] ) {
            if ( proj( a[i]-1, i ).second == 0 ) { t = proj( a[i]-1, i ).first; szX = i+1; break; }
        }
    }

    if ( r == -1 ) {
        printS( t );
        return 0;
    }
    if ( t == -1 ) {
        printS( r );
        return 0;
    }

    if ( r%2 == t%2 ) {
        printS( r );
    }else {
        pair < int, int > cc = proj ( szY, szX );
        if ( cc.first <= 1 && cc.second <= 1 ) {
            if ( cc.first == 0 && cc.second == 0 ) {
                cout << "First\n";
                return 0;
            }else if ( cc.first == 1 ) {
                cout << 12/0 << "\n";
            }else {
                cout << 12/0 << "\n";
            }
        }
        else {
            if ( szX < szY ) {
                printS ( r );
            }else {
                printS( t );
            }
        }
    }
    return 0;
}