Harryxun/stf_run huggingface dataset:
import numpy as np

n = int(input())
max_n = int(n ** 0.5)
memo = np.zeros((max_n, max_n, max_n))

ans = [0]*(n+1)

for x in range(1, max_n):
    for y in range(1, max_n):
        for z in range(1, max_n):
            s = x**2+y**2+z**2+x*y+y*z+z*x
            if s <= n+1:
                ans[s] += 1


for i in range(1, n+1):
    print(ans[i])


### FIXED CODE ###

import numpy as np

n = int(input())
max_n = int(n ** 0.5)
memo = np.zeros((max_n, max_n, max_n))

ans = [0]*(n+1)

for x in range(1, max_n):
    for y in range(1, max_n):
        for z in range(1, max_n):
            s = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if s < n+1:
                ans[s] += 1


for i in range(1, n+1):
    print(ans[i])
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = int(input())

aa = a[0]+a[1]*c
bb = b[0]+b[1]*c
d = aa-bb
e = a[1]-b[1]

if aa > bb:
  if d % e == 0:
    print("YES")
  else:
    print("NO")
elif aa = bb:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if abs(a-b) <= t*(v-w):
    print('YES')
else:
    print('NO')
N, K = map(int, input().split())
routes = list(map(int, input().split()))

otozureta = set([1])
otozureta_list = [1]


def search(list, next):
    if not otozureta.isdisjoint(set([next])):
        return next
    else:
        otozureta.add(next)
        otozureta_list.append(next)
        return search(list, routes[next - 1])


target = search(routes, routes[0])
target_index = otozureta_list.index(target)

otozureta_list_len = len(otozureta_list)
loop_length = otozureta_list_len - target_index
loop_made_length = target_index
#print(otozureta)

if K < otozureta_list_len:
    print(otozureta_list[K])
else:

    print(otozureta_list[loop_made_length + ((K - loop_made_length) % loop_length)])


### FIXED CODE ###

N, K = map(int, input().split())
routes = list(map(int, input().split()))

otozureta = set([1])
otozureta_list = [1]

import sys
sys.setrecursionlimit(1000000)

def search(list, next):
    if not otozureta.isdisjoint(set([next])):
        return next
    else:
        otozureta.add(next)
        otozureta_list.append(next)
        return search(list, routes[next - 1])


target = search(routes, routes[0])
target_index = otozureta_list.index(target)

otozureta_list_len = len(otozureta_list)
loop_length = otozureta_list_len - target_index
loop_made_length = target_index
#print(otozureta)

if K < otozureta_list_len:
    print(otozureta_list[K])
else:

    print(otozureta_list[loop_made_length + ((K - loop_made_length) % loop_length)])
A, B, C = map(int,input().split())
if B+C <=A{
  C=0
}else{
C=B+C-A
}

### FIXED CODE ###

A, B, C = map(int,input().split())
if B+C <= A :
  print(0)
else:
  C = B+C-A
  print(C)
N = int(input())
x = list(input())[::-1]
print(x)
num = 0
nump = 0
numm = 0
pop_num = 0
for i in range(N):
        if x[i] == "1":
            pop_num += 1
for i in range(N):
    if x[i] == "1":
        num += pow(2,i,pop_num)
        num %= pop_num 
        nump += pow(2,i,pop_num+1)
        nump %= pop_num  + 1
        if pop_num != 0:
            numm += pow(2,i,pop_num - 1)
            numm %= pop_num - 1



def popcnt(n):
    c = (n & 0x5555555555555555) + ((n>>1) & 0x5555555555555555)
    c = (c & 0x3333333333333333) + ((c>>2) & 0x3333333333333333)
    c = (c & 0x0f0f0f0f0f0f0f0f) + ((c>>4) & 0x0f0f0f0f0f0f0f0f)
    c = (c & 0x00ff00ff00ff00ff) + ((c>>8) & 0x00ff00ff00ff00ff)
    c = (c & 0x0000ffff0000ffff) + ((c>>16) & 0x0000ffff0000ffff)
    c = (c & 0x00000000ffffffff) + ((c>>32) & 0x00000000ffffffff)
    return c

x = x[::-1]
def calc(i,depth,n):
    if depth == 0:
        if x[i] == "1":
            tmp = numm
            tmp -= pow(2,N-i-1,pop_num-1)
            tmp %= (pop_num - 1)
            return calc(i,depth+1,tmp)
        else:
            tmp = nump
            tmp += pow(2,N-i-1,pop_num+1)
            tmp %= (pop_num + 1)
            return calc(i,depth+1,tmp)
    else:
        if n == 0: return depth
        return calc(i,depth+1, n % popcnt(n))
        

for i in range(N):
    exit()
    print(calc(i,0,0))



### FIXED CODE ###

N = int(input())
x = list(input())[::-1]
num = 0
nump = 0
numm = 0
pop_num = 0
for i in range(N):
        if x[i] == "1":
            pop_num += 1
for i in range(N):
    if x[i] == "1":
        num += pow(2,i,pop_num)
        num %= pop_num 
        nump += pow(2,i,pop_num+1)
        nump %= pop_num  + 1
        if pop_num-1 != 0:
            numm += pow(2,i,pop_num - 1)
            numm %= pop_num - 1



def popcnt(n):
    c = (n & 0x5555555555555555) + ((n>>1) & 0x5555555555555555)
    c = (c & 0x3333333333333333) + ((c>>2) & 0x3333333333333333)
    c = (c & 0x0f0f0f0f0f0f0f0f) + ((c>>4) & 0x0f0f0f0f0f0f0f0f)
    c = (c & 0x00ff00ff00ff00ff) + ((c>>8) & 0x00ff00ff00ff00ff)
    c = (c & 0x0000ffff0000ffff) + ((c>>16) & 0x0000ffff0000ffff)
    c = (c & 0x00000000ffffffff) + ((c>>32) & 0x00000000ffffffff)
    return c

x = x[::-1]
def calc(i,depth,n):
    if depth == 0:
        if x[i] == "1":
            tmp = numm
            if pop_num - 1 != 0:
                tmp -= pow(2,N-i-1,pop_num-1)
                tmp %= (pop_num - 1)
            else:
                return 0
            return calc(i,depth+1,tmp)
        else:
            tmp = nump
            tmp += pow(2,N-i-1,pop_num+1)
            tmp %= (pop_num + 1)
            return calc(i,depth+1,tmp)
    else:
        if n == 0: return depth
        return calc(i,depth+1, n % popcnt(n))
        

for i in range(N):
    print(calc(i,0,0))
s = sorted(list(input()))
t = sorted(list(input()),reverse=True)
if s < t:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a,b = map(int,input().split())
print((a+b+1)//2)
print(int(input(Z)) int(input(X)) int(input(Y)))

### FIXED CODE ###

X,Y,Z=input().split()
print(Z,X,Y)
N = int(input())
ds = list(int(input().split('\n')))

num = set(ds).length()

print(num)

### FIXED CODE ###

n = int(input())
print(len(set(map(int, [input() for i in range(n)]))))
#-*- coding: utf-8 -*-
A = int(input())
B = int(input())
C = int(input())
X = int(input())
ans = 0
for i in range(A + 1):
    for j in range(B + 1):
        for k in range(C + 1):
            if 500*i + 100*j + 50*k == X:
                ans += 1
print(ans)

### FIXED CODE ###

#-*- coding: utf-8 -*-
a = int(input())
b = int(input())
c = int(input())
print((a-b)%c)
s=input()
n=len(s)

def f(i,t):
    if i == n-1:
        return sum(list(map(int, t.split('+'))))
    
    return f(i+1,f+s[i+1]) + f(i+1,f+'+'+s[i+1])

print(f(0,s[0]))

### FIXED CODE ###

s=input()
n=len(s)

def f(i,t):
    if i == n-1:
        return sum(list(map(int, t.split('+'))))
    
    return f(i+1,t+s[i+1]) + f(i+1,t+'+'+s[i+1]) #sumの値を足してる

print(f(0,s[0]))
import numpy as np
import itertools

N, D = [int(i) for i in input().split()]
X = []
for i in range(N):
    X.append(np.array([int(i) for i in input().split()]))

d = []
for c in itertools.combinations(X, 2):
    d.append(np.linalg.norm(c[1] - c[0]))

d = np.array(d)
print(len([True for x in d if x.is_integer()]))

### FIXED CODE ###

import numpy as np
import itertools
 
N, D = [int(i) for i in input().split()]
X = []
for i in range(N):
    X.append(np.array([int(i) for i in input().split()]))

d = []
for c in itertools.combinations(X, 2):
    d.append(np.linalg.norm(c[1] - c[0]))

print(len([True for x in d if x.is_integer()]))
n, a, b, c, d = map(int,input().split())
s = input()

if c<d:
    s = list(s)
    h = s[b:d]
    for i in range(1,len(h)):
        if "##" in h:
            print("No")
            break
    else:
        hh = s[a:c]
        for i in range(1,len(hh)):
            if "##" in hh:
                print("No")
                break
        else:
            print("Yes")
else:
    if "..." in s[a:d]:
        h = s[a:c]
        for i in range(1,len(h)):
            if h[i]==h[i-1] and h[i]=="#":
                print("No")
                break
        else:
            hh = s[b:d]
            for i in range(1,len(hh)):
                if hh[i]==hh[i-1] and hh[i]=="#":
                    print("No")
                    break
            else:
                print("Yes")
    else:
        s = list(s)
        h = s[b:d]
        for i in range(1,len(h)):
            if h[i]==h[i-1] and h[i]=="#":
                print("No")
                break
        else:
            print("No")





### FIXED CODE ###

a, p = map(int,input().split())
print((3*a+p)//2)
a,b = map (int, input().split)
if a<b:
    print("a < b")
elif a>b:
    print("a > b")
else a == b:
    print("a == b")


### FIXED CODE ###

a,b = map (int, input().split())
if a<b:
    print("a < b")
elif a>b:
    print("a > b")
else:
    print("a == b")
N = int(input())
mod = 10 **9 + 7

def equal(item0, item1, delta = 10 ** (-18)):
    if abs(item0 - item1) < delta:
        return True
    else:
        return False
def bigger(item0, item1, delta = 10** (-18)):
    if item0 -item1 > delta:
        return True
    else:
        return False
bitlist = [1]
for k in range(N):
    bitlist.append(bitlist[-1]*2%mod)


liABplus = []
liBAplus = []
from bisect import insort
for _ in range(N):
    A, B = map(int, input().split())
    if A*B > 0:
        insort(liABplus, A/B)
    else:
        insort(liBAplus, -B/A)
def make_count(list):
    k = 0
    lis = []
    while k < len(list):
        cnt = 1
        while k+1 < len(list):
            if equal(list[k], list[k+1]):
                cnt += 1
                k += 1
                continue
            else:
                break
        lis.append([list[k], cnt])
        k += 1
    return lis

liABplus = make_count(liABplus)
liBAplus = make_count(liBAplus)

from collections import deque
liABplus = deque(liABplus)
liBAplus = deque(liBAplus)
ans = bitlist[N]-1 #all pattern
flag = True
eqpair = []
while liABplus and liBAplus:
    if flag:
        AB = liABplus.popleft()
        BA = liBAplus.popleft()
    if equal(AB[0], BA[0]):
        eqpair.append([AB[1], BA[1]])
        if liABplus and liBAplus:
            flag = True
            continue
        else:
            break
    elif bigger(AB[0], BA[0]):
        if liBAplus:
            BA = liBAplus.popleft()
            flag = False
            continue
        else:
            break
    else:
        if liABplus:
            AB = liABplus.popleft()
            flag = False
            continue
        else:
            break

minus = 0
from itertools import combinations
for k in range(1, len(eqpair)+1):
    for item in combinations(eqpair, k):
        sgn = (-1)**k
        ideal = 1
        cnt = 0
        for i in item:
            cnt += i[0] + i[1]
            ideal *= bitlist[i[0]]-1
            ideal %= mod
            ideal *= bitlist[i[1]]-1
            ideal %= mod
        ideal *= bitlist[N-cnt]
        ideal %= mod
        ans += sgn*ideal
        ans %= mod
print(ans)



### FIXED CODE ###

from collections import defaultdict
from math import gcd
N = int(input())
MOD = 10**9 + 7
L = defaultdict(lambda: [0,0])
zero = 0
for _ in range(N):
    A, B = map(int, input().split())
    if A==0: d=B
    elif B==0: d=A
    else: d=gcd(A,B)
    if d != 0:
        A, B = A//d, B//d
        if A<0: A, B = -A, -B
        if B>0: L[(A,B)][0] += 1
        else: L[(-B,A)][1] += 1
    else: zero += 1

res = 1

for x,y in L.values():
    res *= pow(2,x,MOD) + pow(2,y,MOD) -1
    res %= MOD
print((res+zero-1)%MOD)
s = input()
k = int(input())


list_pair = []
i = 0
while i <= len(s):
    for j in range(i+1,len(s)+1):
        list_pair.append(s[i:j])
    i = i + 1

list_pair = list(set(list_pair))

abc = "abcdefghijklmnopqrstuvwxyz"
tmp = []

i = 0
j = 0
while len(tmp) < k + 1:
    for list_j in list_pair:

        if abc[i]==list_j[0]:
            tmp.append(list_j)

    i = i+1

tmp.sort()

print(tmp[k-1])










# if len(s)<=50:
#     list_pair.sort()
#     print(list_pair[k-1])
# else:
#     print(1)
    # tmp = copy.deepcopy(list_pair)
    # abc = "abcdefghijklmnopqrstuvwxyz"
    # i = 0
    # while len(tmp) < 100:
    #     for j in range(1,len(s)):
    #         if abc[i] == tmp[j][] :
    #     i = i + 1


### FIXED CODE ###

s = input()
k = int(input())


list_pair = []
i = 0
while i <= len(s):
    for j in range(1,min(len(s)-i+1,k+1)):
#        print(j,s[i:i+j])
        list_pair.append(s[i:i+j])
    i = i + 1

list_pair = list(set(list_pair))

list_pair.sort()
print(list_pair[k-1])
import sys
n,m = [int(x) for x in sys.stdin.readline().split()]
r = [0] * n
for i in range m:
	a, b = [int(x) for x in sys.stdin.readline().split()]
	r[a-1] += 1
	r[b-1] += 1
for i in range n:
	print(r[i])

### FIXED CODE ###

import sys

a, b, c = [int(x) for x in sys.stdin.readline().split()]

if a <= c and b >= c:
	print('Yes')
else:
	print('No')
N, K = map(int, input().split())
p = list(map(int, input().split()))

p_likelihood = [0] * N
for pi in range(N):
    p_likelihood[i] = (p[i] + 1) / 2

ans = 0
for i in range(N-K+1):
    res = sum(p_likelihood[i:i+K])
    ans = max(ans, res)

print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
p = list(map(int, input().split()))

res = sum(p[:K])
res_max = res
i_max = 0
for i in range(1, N-K+1):
    res += p[i+K-1] - p[i-1]
    if res > res_max:
        res_max = res
        i_max = i

ans = 0
for j in range(K):
    ans += (p[i_max + j] + 1) / 2
print(ans)
A,B = map(int,input().split())

K = (A+B)/2
K_ = (A+B)%2
if K_>0:
  print("IMPOSSIBLE")
else:
  print(int(K)

### FIXED CODE ###

A,B = map(int,input().split())

K = (A+B)/2
K_ = (A+B)%2
if K_>0:
  print("IMPOSSIBLE")
else:
  print(int(K))
N, K = map(int, input().split())

paskal3 = [[1]]
for i in range(1, N+5):
    l = [1]
    for j in range(1, i):
        l.append(paskal3[i-1][j-1]+paskal3[i-1][j])
    l.append(1)
    paskal3.append(l)


def comb(n, r):
    return paskal3[n][r]


if N == K:
    for i in range(1, K+1):
        if i == 1:
            print(1)
        else:
            print(0)
    exit()

for i in range(1, K+1):
    print((comb(N-K+1, i) * comb(K-1, i-1)) % (10**9+7))


### FIXED CODE ###

N, B = map(int, input().split())
R = N-B
MOD = 10**9+7

paskal3 = [[1]]
for i in range(1, N+5):
    l = [1]
    for j in range(1, i):
        l.append((paskal3[i-1][j-1]+paskal3[i-1][j]) % MOD)
    l.append(1)
    paskal3.append(l)


def comb(n, r):
    try:
        return paskal3[n][r]
    except:
        return 0


for i in range(1, B+1):
    print((comb(R+1, i) * comb(B-1, i-1)) % MOD)
n = int(input()); s = []
for _ in range(n):
  s.append(input())
 
dic = {"AC":0,
       "WA":0,
       "TLE":0,
       "RE":0}

for res in s:
  dic[s] += 1
  
for k in dic:
  print(f"{k} x {dic[k]}")

### FIXED CODE ###

n = int(input()); s = []
for _ in range(n):
  s.append(input())
 
dic = {"AC":0,
       "WA":0,
       "TLE":0,
       "RE":0}

for res in s:
  if res in dic: dic[res] += 1
  
for k in dic:
  print(f"{k} x {dic[k]}")
n=int(input())
xyh=[list(map(int,input().split())) for _ in range(n)]
xyh=sorted(xyh, key=lambda x:x[2], reverse=True)

for xi in range(101):
    for yi in range(101):
        hi=0
        flag=True
        for i in range(n):
            x=xyh[i][0]
            y=xyh[i][1]
            h=xyh[i][2]
            if i==0:
                hi=abs(xi-x)+abs(yi-y)+h
            if max(hi-abs(xi-x)-abs(yi-y),0)!=h:
                flag=False
        if flag:
            print(xi, yi, hi)
            break
    else:
        continue
    break

### FIXED CODE ###

n=int(input())
if n==1:
  print("Hello World")
else:
  a,b=[int(input()) for i in range(2)]
  print(a+b)
l  = raw_input().split()

a = int(l[0])*int(l[1])
b = int(l[0])*2+int(l[1])*2
print a ,b

l = raw_input().split()

### FIXED CODE ###

l  = raw_input().split()

a = int(l[0])*int(l[1])
b = int(l[0])*2+int(l[1])*2
print a ,b
N,M = [int(i) for i in input().split()]
data = [int(i) for i in input().split()]


for i in range(M):
    data[data.index(max(data))] /= 2

for i in range(M):
    data[i] = data[i]//1


print(int(sum(data)))

### FIXED CODE ###

import heapq


N,M = [int(i) for i in input().split()]
data = [int(i) for i in input().split()]
data = list(map(lambda x: x*(-1), data))
heapq.heapify(data)
#print(data)
while M != 0:
    x = heapq.heappop(data)*(-1)
    heapq.heappush(data,-1*(x//2))
    M -= 1
    #print(data)
 
print(-sum(data))
x = input()
bigpleasure = x//500*1000
smallpleasure = x%500//5*5

print(bigpleasure+smallpleasure)

### FIXED CODE ###

x = int(input())
bigpleasure = (x//500)*1000
smallpleasure = ((x%500)//5)*5

print(bigpleasure+smallpleasure)
## https://atcoder.jp/contests/abc170/submissions/14416787

import sys
input=sys.stdin.readline

class SegmentTree():
    def __init__(self,n,init):
        self.offset=2**((n-1).bit_length())
        self.tree=[init]*(2*self.offset)
        self.init=init
    def update(self,pos,val):
        pos+=self.offset
        self.tree[pos]=val
        while pos>1:
            pos=pos//2
            self.tree[pos]=max(self.tree[2*pos],self.tree[2*pos+1])
    def query(self,l,r):
        l+=self.offset
        r+=self.offset
        ret=self.init
        while l<=r:
            ret=max(ret,self.tree[r])
            r=(r-1)//2
            ret=max(ret,self.tree[l])
            l=(l+1)//2
        return ret

import sys
input=sys.stdin.readline
n,k=map(int,input().split())
a=[int(input()) for _ in range(n)]

st=SegmentTree(n+2,0)

for ai in a:
    l=max(0,ai-k)
    r=min(n+1,ai+k+1)
    m=st.query(l,r)
    st.update(ai,m+1)

print(st.query(0,n+1))
  

### FIXED CODE ###


## https://atcoder.jp/contests/abc170/submissions/14416787
class SegmentTree():
    def __init__(self,n,init):
        self.offset=2**((n-1).bit_length())
        self.tree=[init]*(2*self.offset)
        self.init=init
    def update(self,pos,val):
        pos+=self.offset
        self.tree[pos]=val
        while pos>1:
            pos=pos//2
            self.tree[pos]=max(self.tree[2*pos],self.tree[2*pos+1])
    def query(self,l,r):
        l+=self.offset
        r+=self.offset
        ret=self.init
        while l<=r:
            ret=max(ret,self.tree[r])
            r=(r-1)//2
            ret=max(ret,self.tree[l])
            l=(l+1)//2
        return ret

import sys
input=sys.stdin.readline
n,k=map(int,input().split())
a=[int(input()) for _ in range(n)]

st=SegmentTree(300001,0)
##queryが開区間でない
for ai in a:
    l=max(0,ai-k)
    r=min(300001,ai+k)
    m=st.query(l,r)
    st.update(ai,m+1)

print(st.query(0,300001))
LI():
  return [int(s) for s in input().split()]
 
A,B = LI()
 
print(int(A-2*B)) if A > 2*B else print(0)

### FIXED CODE ###

def LI():
  return [int(s) for s in input().split()]
 
A,B = LI()
 
print(int(A-2*B)) if A > 2*B else print(0)
a = input().split()
for i in range(4):
  if i = 0:
    print(i)

### FIXED CODE ###

a = list(map(int, input().split()))
n = 0
for i in range(5):
  if a[n] == 0:
    print(n+1)
    break
  else:
    n += 1
import sys
N, M = map(int, input().split())

a_list = [0] * M

for m in range(M):
    a_list[m] = int(input())

for m in range(M - 1):
    if a_list[m] + 1 == a_list[m + 1]:
        print(0)
        sys.exit()
    else:
        continue

range_list = [i for i in range(1, N + 1)]
new_list = [0] * (M + 1)

new_list[0] = [0] + range_list[0: a_list[0] - 1]
new_list[M] = range_list[a_list[M - 1]:]

if M - 1 >= 1:
    for m in range(1, M):
        new_list[m] = range_list[a_list[m - 1]: a_list[m] - 1]

MOD = 1000000007

def fib(n):
    dp_list = [0] * n
    dp_list[0] = 1
    dp_list[1] = 2
    
    for i in range(2, n):
        dp_list[i] = dp_list[i - 1] + dp_list[i - 2]
    return dp_list[n - 1]

count = 1
for item in new_list:
    if not item or len(item) == 1:
        continue
    else:
        count *= (fib(len(item) - 1) % MOD)
        count %= MOD
        #print(count)
print(count)

### FIXED CODE ###

import sys
N, M = map(int, input().split())

MOD = 1000000007

def fib(n):
    dp_list = [0] * n
    dp_list[0] = 1
    if n == 1:
        return 1
    dp_list[1] = 2
    
    for i in range(2, n):
        dp_list[i] = dp_list[i - 1] + dp_list[i - 2]
    return dp_list[n - 1]

if M == 0:
    print(fib(N) % MOD)
    sys.exit()

a_list = [0] * M

for m in range(M):
    a_list[m] = int(input())

for m in range(M - 1):
    if a_list[m] + 1 == a_list[m + 1]:
        print(0)
        sys.exit()
    else:
        continue

range_list = [i for i in range(1, N + 1)]
new_list = [0] * (M + 1)


new_list[0] = [0] + range_list[0: a_list[0] - 1]
new_list[M] = range_list[a_list[M - 1]:]

if M - 1 >= 1:
    for m in range(1, M):
        new_list[m] = range_list[a_list[m - 1]: a_list[m] - 1]

count = 1
for item in new_list:
    if not item or len(item) == 1:
        continue
    else:
        count *= (fib(len(item) - 1) % MOD)
        count %= MOD
        #print(count)
print(count)
import io
import sys
import math

n=int(input())
ans=0
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))

for i in range(n):
  ans+=B[i]
for j in range(n-1):
  if (A[j]+1)==A[j+1]:
    ans+=C[A[j]-1]
print(ans)

### FIXED CODE ###

N=input()
print(int(N)**3)
# -*- coding: utf-8 -*-

n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]

mod = 10**9+7

dp = [0] * (n+1)
dp[0] = 1
if 1 in a:
    dp[1] = 0
else:
    dp[1] = 1

for i in range(2, n+1):
    if i not in a:
        dp = dp[i-1] + dp[i-2]
        dp[i] = dp%mod
    else:
        dp[i] = 0

#print(dp)
print(dp[-1])


### FIXED CODE ###

# -*- coding: utf-8 -*-

n, m = map(int, input().split())

stairs = [i for i in range(1, n+1)]
a = [0 for _ in range(m)]
for i in range(m):
  a[i] = int(input())
a = set(a)
  
mod = 10**9+7
dp = [0] * (n+1)
dp[0] = 1

#print(test_a)
for i in range(1, n+1):
    if i in a:
        continue
    dp[i] = dp[i] + dp[i-1]
    if i > 1:
        dp[i] = dp[i] + dp[i-2]

#print(dp)
print(dp[-1]%mod)
N = int(input())
A = list(map(int, input().split(" ")))
abs_list = list(map(abs, A))
abs_list.sort()
pos = list(filter(lambda x: x > 0, A))
neg = list(filter(lambda x: x < 0, A))

# A has 0
if abs_list[0] == 0:
	print(sum(abs_list))
elif len(neg) % 2 == 0:
	print(sum(abs_list))
elif abs(pos[0]) < abs(neg[-1]):
	print(sum(abs_list) - 2*pos[0] - 2*neg[-1])
else:
	print(sum(pos) - sum(neg[:-1]))



### FIXED CODE ###

N = int(input())
A = list(map(int, input().split(" ")))
abs_list = list(map(abs, A))
abs_list.sort()
pos = list(filter(lambda x: x > 0, A))
neg = list(filter(lambda x: x < 0, A))
pos.sort()
neg.sort()

# A has 0
if abs_list[0] == 0:
	print(sum(abs_list))
elif len(neg) % 2 == 0:
	print(sum(abs_list))
elif len(pos) > 0 and abs(pos[0]) < abs(neg[-1]):
	print(sum(abs_list) - 2*pos[0])
else:
	print(sum(abs_list[1:])-abs_list[0])