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 Java8 (OpenJDK 1.8.0) (judge verdict: Wrong Answer)

import java.io.*;
import java.util.*;

public class Main {
  private static InputReader in;
  private static PrintWriter out;

  public static void main(String[] args) throws IOException {
    in = new InputReader(System.in);
    out = new PrintWriter(System.out, true);

    int n = in.nextInt();
    int[] arr = new int[n];
    for (int i = 0; i < n; i++) arr[i] = in.nextInt();
    Arrays.sort(arr);
    for (int i = arr.length-1; i > 0; i--)
      arr[i] = (arr[i] - arr[i-1]) % 2;
    arr[0] = arr[0] % 2;
    boolean winner = false;
    while(true) {
      if (arr.length == 1) {
        winner = arr[0] % 2 == 0;
        break;
      }
      int c = 0;
      ArrayList<Integer> x = new ArrayList<>();
      boolean allone = true;
      for (int i = 0; i < arr.length; i++) {
        if (arr[i] == 1) {
          if (c > 0) x.add(c);
          c = 0;
        } else {
          allone = false;
        }
        c += 1;
      }
      x.add(c);
      if (allone) {
        winner = arr.length % 2 == 0;
        break;
      }
      arr = new int[x.size()];
      for (int i = 0; i < x.size(); i++) arr[arr.length-i-1] = x.get(i) % 2;
    }
    out.println(winner ? "First" : "Second");
    out.close();
    System.exit(0);
  }

  static class InputReader {
    public BufferedReader reader;
    public StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
      reader = new BufferedReader(new InputStreamReader(stream), 32768);
      tokenizer = null;
    }

    public String next() {
      while (tokenizer == null || !tokenizer.hasMoreTokens()) {
        try {
          tokenizer = new StringTokenizer(reader.readLine());
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
      }
      return tokenizer.nextToken();
    }

    public int nextInt() {
      return Integer.parseInt(next());
    }
  }


}