Problem:
Score : 300 points

Problem Statement

Snuke and Raccoon have a heap of N cards. The i-th card from the top has the integer a_i written on it.

They will share these cards.
First, Snuke will take some number of cards from the top of the heap, then Raccoon will take all the remaining cards.
Here, both Snuke and Raccoon have to take at least one card.

Let the sum of the integers on Snuke's cards and Raccoon's cards be x and y, respectively.
They would like to minimize |x-y|.
Find the minimum possible value of |x-y|.

Constraints

2 \leq N \leq 2 \times 10^5

-10^{9} \leq a_i \leq 10^{9}

a_i is an integer.

Input

Input is given from Standard Input in the following format:

N
a_1 a_2 ... a_{N}

Output

Print the answer.

Sample Input 1

6
1 2 3 4 5 6

Sample Output 1

1

If Snuke takes four cards from the top, and Raccoon takes the remaining two cards, x=10, y=11, and thus |x-y|=1. This is the minimum possible value.

Sample Input 2

2
10 -10

Sample Output 2

20

Snuke can only take one card from the top, and Raccoon can only take the remaining one card. In this case, x=10, y=-10, and thus |x-y|=20.

Solution in Ruby (2.3.3) (judge verdict: Runtime Error)

def calcs(x,y,ax,ay,bx,by) ((ax-x)*(by-y)-(bx-x)*(ay-y))/2.0 end
def inpf() a=gets.chomp.split(" ").map(&:to_f)end
def inps() a=gets.chomp.split(" ")end  
def copy(a) Marshal.load(Marshal.dump(a)) end
def kaizyo(n)(n < 2)? 1 : (2..n).inject(:*) end
def scount(a) b=na(a.max+1);a.each{|n|b[n]+=1};return b end
def na(n,d=0) Array.new(n,d)end
def na2(n,m,d=0) Array.new(n){Array.new(m,d)}end
def na3(n,m,l,d=0) Array.new(n){Array.new(m){Array.new(l,d)}}end
def bit(n) n.to_s(2).split("").map(&:to_i) end
def inp() a=gets.chomp.split(" ").map(&:to_i)end
n = inp[0]
tab = na2(n+1,0)
lis = na(n+1,0)
(n-1).times do
  dat = inp
  tab[dat[0]].push(dat[1])
  tab[dat[1]].push(dat[0])
end
fn = 1
ff = 1
lis[1] = 1
lis[n] = 1
que1 = []
que2 = []
tab[1].each do |d|
  que1.push(d) 
end
tab[n].each do |d|
  que2.push(d)
end

while (que1.size > 0 or que2.size > 0)
  if(que1.size > 0)
    now = que1.shift
    if(lis[now] != 1)
      fn += 1
      lis[now] = 1
      tab[now].each do |d|
        que1.push(d) 
      end
    end
  else
  end
  if(que2.size > 0)
    now = que2.shift
    if(lis[now] != 1)
      lis[now] = 1
      ff += 1
      tab[now].each do |d|
        que2.push(d)
      end
    end
  end
end

puts (fn > ff)? "Fennec" : "Snuke"