Harryxun/stf_run huggingface dataset:
from collections import defaultdict
from bisect import bisect_left as bisect
import sys
mod = 10**9+7
N = int(input())
A = list(map(int, input().split()))
S = [0]*(N+1)
zeros = []
count = defaultdict(list)
now = -1
for i in range(N):
    S[i] = S[i-1]^A[i]
    if S[i] == 0:
        zeros.append(i)
    else:
        count[S[i]].append(i)
if S[N-1] != 0:
    a = S[N-1]
    res = []
    for i in count[a]:
        res.append(bisect(zeros, i)-cnt)
        cnt+=res[-1]
    res0 = 1
    res1 = 0
    for c in res:
        res0 = res0+res1*c
        res1 = res1+res0
        res0%=mod
        res1%=mod
    print(res0)
    sys.exit()
ans = pow(2, len(zeros)-1, mod)
for a in count.keys():
    cnt = 0
    res = []
    for i in count[a]:
        res.append(bisect(zeros, i)-cnt)
        cnt+=res[-1]
    res0 = 1
    res1 = 0
    for c in res:
        res0 = res0+res1*c
        res1 = res1+res0
        res0%=mod
        res1%=mod
    ans+=res1
print(ans)   

### FIXED CODE ###

from collections import defaultdict
from bisect import bisect_left as bisect
import sys
mod = 10**9+7
N = int(input())
A = list(map(int, input().split()))
S = [0]*(N+1)
zeros = []
count = defaultdict(list)
now = -1
for i in range(N):
    S[i] = S[i-1]^A[i]
    if S[i] == 0:
        zeros.append(i)
    else:
        count[S[i]].append(i)
if S[N-1] != 0:
    a = S[N-1]
    res = []
    cnt = 0
    for i in count[a]:
        res.append(bisect(zeros, i)-cnt)
        cnt+=res[-1]
    res0 = 1
    res1 = 0
    for c in res:
        res0 = res0+res1*c
        res1 = res1+res0
        res0%=mod
        res1%=mod
    print(res0)
    sys.exit()
ans = pow(2, len(zeros)-1, mod)
for a in count.keys():
    cnt = 0
    res = []
    for i in count[a]:
        res.append(bisect(zeros, i)-cnt)
        cnt+=res[-1]
    res0 = 1
    res1 = 0
    for c in res:
        res0 = res0+res1*c
        res1 = res1+res0
        res0%=mod
        res1%=mod
    ans+=res1
    ans%=mod
print(ans)
n,m,d = map(int,input().split())

"""
#kuso code
start = time.time()
a = [random.randrange(n) for i in range(m)]
a = np.array(a)
b = np.abs(a[1:]-a[:-1])
cnt = np.sum(b == d)
ave = cnt

i = 0
while(time.time() - start < 10):
    a = [random.randrange(n) for i in range(m)]
    a = np.array(a)
    b = np.abs(a[1:]-a[:-1])
    cnt = np.sum(b == d)
    ave = ((i+1)*ave + cnt)/(i+2)
    i += 1
print(ave)
"""

oks*n = 2*np.max(n-2*d,0) + 2*d)
ave = oks*(m-1)/n/n
print(ave)

### FIXED CODE ###

a,b = map(int, input().split())

if(a+b ==15):
    print("+")
elif(a*b == 15):
    print("*")
else:
    print("x")
A, B, C, D, E, F = map(int, input().split())
num = None
rec = 0
for a in range(101):
    for b in range(101):
        if a * A * 100 + b * B * 100 > F:
            break
        for c in range(100):
            if a * A * 100 + b * B * 100 + c * C > F:
                break
            for d in range(100):
                q = a * A * 100 + b * B * 100
                p = C * c + D * d
                if p > E * (a * A + b * B):
                    continue
                if p + q == 0:
                    continue
                if p + q <= F:
                    if rec < 100 * p / (p + q):
                        rec = 100 * p / (p + q)
                        num = (p + q, p)
                else:
                    break
print(num[0], num[1])

### FIXED CODE ###

a, b, c, d, e, f = map(int, input().split())
rec = (0, 0)
ma = 0
for i in range(31):
    for j in range(31):
        for k in range(100):
            t = i * a * 100 + j * b * 100 + c * k
            if t > f:
                break
            for l in range(100):
                s = i * a * 100 + j * b * 100 + c * k + d * l
                if s > f:
                    break
                if c * k + d * l > (a * i + b * j) * e:
                    break
                if (i * a + j * b + c * k + d * l) == 0:
                    continue
                q = (c * k + d * l) / (100 * i * a + 100 * j * b + c * k + d * l) * 100
                if q >= ma:
                    ma = q
                    rec = (s, c * k + d * l)

print(rec[0], rec[1])
N = int(input()) 
A = list(map(int, input().split()))
Q = int(input()) 
for i in range(q):
    b, c = map(str, input().split())
    if int(b) in A:
        A = [int(str(a).replace(b, c)) for a in A]
    print(sum(A))

### FIXED CODE ###

#!/usr/bin/env python3
from collections import Counter
N = int(input())
A = list(map(int, input().split()))
d = Counter(A)
Q = int(input())
ans = sum(A)
for i in range(Q):
    b, c = map(int, input().split())
    ans += (c-b) * d[b]
    d[c] += d[b]
    d[b] = 0
    print(ans)
import math

N, K = map(int, input().split())
A = list(map(int, input().split()))
ans = 0

if N == K:
    print(1)
    quit()
else:
    one_index = A.index(1)
    l = one_index #1の左側にある数字の数
    r = N - one_index - 1 #1の右側にある数字の数

    assert l % 3 == 0
    
    print(114514)

### FIXED CODE ###

input_line = input().split()

num_array = int(input_line[0])
num_equal = int(input_line[1])

input_line = input() # 無視

equalized = 1
i = 0
while equalized < num_array:
    equalized += (num_equal - 1)
    # print(i, equalized)
    i += 1

print(str(i))
import sys

N=int(input())

a=list(map(int,input().split()))
b=list(map(int,input().split()))
a=[[a[i],i] for i in range(N)]
b=[[b[i],i] for i in range(N)]
aa,bb=sorted(a),sorted(b)

for i in range(N):
    if aa[i][0]>bb[i][0]: print("No"),sys.exit()

for i in range(N-1):
    if aa[i][0]==aa[i+1][0] or bb[i][0]==bb[i+1][0]: print("Yes"),sys.exit()
    if bb[i][0]>=aa[i+1][0]: print("Yes"),sys.exit()


dicb={}
for i in range(N):
    dicb[bb[i][0]]=i
tmp=0
j=0
while tmp<N-2:
    j=dicb[b[j][0]]
    if j==0: print("Yes"),sys.exit()
    tmp+=1
print("No")

### FIXED CODE ###

N=int(input())
if N%2==0: print(N//2-1)
else: print(N//2)
n=input()
if n.islower:
	if n[2]==n[3] and n[4==n[5]:
		print("Yes")
	else:
		print("No")
else:
	print("No")

### FIXED CODE ###

n=input()
if n.islower():
	if n[2]==n[3] and n[4]==n[5]:
		print("Yes")
	else:
		print("No")
else:
	print("No")
n=int(input())
a=list(map(int,input().split()))
a,b,c=0,0,0
ans='No'
for i in a:
  if a%4==0:
    a+=1
  elif a%2==0:
    b+=1
  else:
    c+=1
if n%2==1:
  if c-a==1:
    if b==0:
      ans='Yes'
  elif a>=c:
    ans='Yes'
else:
  if a>=c:
    ans='Yes'
print(ans)

### FIXED CODE ###

n=int(input())
x=list(map(int,input().split()))
a,b,c=0,0,0
ans='No'
for i in x:
  if i%4==0:
    a+=1
  elif i%2==0:
    b+=1
  else:
    c+=1
if n%2==1:
  if c-a==1:
    if b==0:
      ans='Yes'
  elif a>=c:
    ans='Yes'
else:
  if a>=c:
    ans='Yes'
print(ans)
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def main():
    N, K = map(int, input().split())
    MOD = 10 ** 9 + 7
    for i in range(1,K+1):
        blue = cmb(K-1,i-1)
        red = cmb(N-K+1,N-K-i+1)
        ans = blue * red
        ans %= MOD
        print(ans)
        


if __name__ == "__main__":
    main()

### FIXED CODE ###

import math

def comb(n, k):
    return math.factorial(n) // math.factorial(k) // math.factorial(n - k)

def main():
    MOD = 10 ** 9 + 7
    N, K = map(int, input().split())
    for i in range(1,K+1):
        if i > N - K + 1:
            print(0)
            continue
        blue = comb(N-K+1,i) % MOD
        red = comb(K-1,i-1) % MOD

        ans = blue * red % MOD

        print(ans)
            

main()
N = int(input())
if N % 2 == 0:
    answer = N /2
else:
    answer = (N + 1) / 2

print(int(answer)

### FIXED CODE ###

N = int(input())
if N % 2 == 0:
    answer = N /2
else:
    answer = (N + 1) / 2

print(int(answer))
N,M = list(map(int, input().split()))
s = []
c = []
for i in range(M):
    inputs = list(map(int, input().split()))
    s.append(inputs[0])
    c.append(inputs[1])

res = [0 for i in range(N)]
for digit, number in zip(s,c):
    index = digit - 1
    if res[index] == 0:
        res[index] = number
    else: #　すでに他の値が入っている場合
        if res[index] >= number: #　新しいnumberの方が小さい場合
            res[index] = number
        else:
            pass

convert = list(map(str, res))
res = int("".join(convert))
if len(str(res)) == N:
    print(res)
else:
    print(-1)

### FIXED CODE ###

n = int(input())
def main(n):
  return n // 2 + n % 2
print(main(n))
n,r=map(int,input())
if n<10:
  print(r-100*(10-n))
else:
  print(r)

### FIXED CODE ###

n,r=map(int,input().split())
if n<10:
  print(r+100*(10-n))
else:
  print(r)
def main():
    h, w = map(int, input().split())
    k = [["."]+list(input())+["."] for _ in range(h)]
    s = [[None]*(w+2) for _ in range(h+2)]
    s[0] = ["."]*(w+2)
    s[-1] = ["."]*(w+2)
    s[1:h+1] = k
    d = [[0, 1], [0, -1], [1, 0], [-1, 0]]
    if w == 1:
        for i in range(1, h+1):
            if s[i][1] == "#":
                if s[i+1][1] == "." and s[i-1][1] == ".":
                    print("No")
                    return  
        print("Yes")
        return
    if h == 1:
        for i in range(1, w+1):
            if s[1][i] == "#":
                if s[1][i+1] == "." and s[1][i-1] == ".":
                    print("No")
                    return  
        print("Yes")
        return
    for i in range(1, w+1):
        for j in range(1, h+1):
            if s[i][j] == ".":
                continue
            flag = True
            for (di, dj) in d:
                if s[i+di][j+dj] == "#":
                    flag = False
                    break
            if flag:
                print("No")
                return
    print("Yes")

if __name__ == "__main__":
    main()

### FIXED CODE ###

import numpy as np
h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]
s = np.array(s)
out = "Yes"
for i in range(h):
    for j in range(w):
        if s[i][j] == ".":
            continue
        if i == 0 and j == 0:
            up = s[i][j]
            down = s[i + 1][j]
            left = s[i][j]
            right = s[i][j + 1]
        elif i == 0 and j == w-1:
            up = s[i][j]
            down = s[i + 1][j]
            left = s[i][j - 1]
            right = s[i][j]
        elif i == h-1 and j == 0:
            up = s[i - 1][j]
            down = s[i][j]
            left = s[i][j]
            right = s[i][j + 1]
        elif i == h-1 and j == w-1:
            up = s[i - 1][j]
            down = s[i][j]
            left = s[i][j - 1]
            right = s[i][j]
        elif i == 0 and j != 0 and j != w-1:
            up = s[i][j]
            down = s[i + 1][j]
            left = s[i][j - 1]
            right = s[i][j + 1]
        elif i == h-1 and j != 0 and j != w-1:
            up = s[i - 1][j]
            down = s[i][j]
            left = s[i][j - 1]
            right = s[i][j + 1]
        elif j == 0 and i !=  0 and i != h-1:
            up = s[i - 1][j]
            down = s[i + 1][j]
            left = s[i][j]
            right = s[i][j + 1]
        elif j == w-1 and i != 0 and i!= h-1:
            up = s[i - 1][j]
            down = s[i + 1][j]
            left = s[i][j - 1]
            right = s[i][j]
        else:
            up = s[i-1][j]
            down = s[i+1][j]
            left = s[i][j-1]
            right = s[i][j+1]
        if s[i][j] != up and s[i][j] != down and s[i][j] != left and s[i][j] != right:
            out = "No"
print(out)
from functools import lru_cache

N,K=[int(i) for i in input().split(" ")]
V=[int(i) for i in input().split(" ")]

@lru_cache()
def value(V,k,hands):
    if k==0:
        return sum(hands)
    else:
        retval=sum(hands)
        try:
            retval=max(value(V[1::],k-1,sorted(hands+[V[0]])),retval)
        except:
            pass
        try:
            p2=value(V[:-1:],k-1,sorted(hands+[V[-1]]))
            retval=max(retval,p2)
        except:
            pass
        try:
            p3=value(V+[hands[0]],k-1,hands[1::])
            retval=max(p3,retval)
        except:
            pass
        try:
            p4=value([hands[0]]+V,k-1,hands[1::])
            retval=max(p4,retval)
        except:
            pass
        return retval

print(value(V,K,[]))


### FIXED CODE ###

from functools import lru_cache
import numpy as np

N,K=[int(i) for i in input().split(" ")]
V=[int(i) for i in input().split(" ")]

retval=0
for left in range(max(N+1,K+1)):
    for right in range(min(N-left+1,K-left+1)):
        modoseru=K-(left+right)
        temoto=np.asarray(sorted(V[:left:]+V[N-right::]))
        modosu=min(np.sum(temoto<0),modoseru)
        retval=max(sum(temoto[modosu::]),retval)

print(retval)
import math
import sys

n, x = list(map(lambda x : int(x),input().split()))

zahyo = list(map(lambda x : int(x),input().split()))

zahyo.append(x)
zahyo.sort()

min = zahyo[1] - zahyo[0]

is_odd = False
is_even = False

odds = list()

for i in range(n):
    diff = zahyo[i+1] - zahyo[i]

    if diff % 2 == 0:
        is_even == True
    else:
        is_odd = True
        odds.append(diff)

    if diff < min:
        min = zahyo[i+1] - zahyo[i]

# print(is_odd)
# print(is_even)
if len(odds) >= 1:
    for i in range(if len(odds)):
        for j in range(len(odds)):
            if math.gcd(odds[i], odds[j]) == 1:
                print(1)
                sys.exit()


if is_odd == True and is_even == True:
    print(1)
else:
    print(min)


### FIXED CODE ###

import math
from functools import reduce
import fractions
import sys


def gcd(*numbers):
    return reduce(fractions.gcd,numbers)


n, x = list(map(lambda x : int(x),input().split()))

zahyo = list(map(lambda x : int(x),input().split()))

zahyo.append(x)
zahyo.sort()

min = zahyo[1] - zahyo[0]

is_odd = False
is_even = False

odds = list()

for i in range(n):
    diff = zahyo[i+1] - zahyo[i]

    if diff % 2 == 0:
        is_even == True
    else:
        is_odd = True
        odds.append(diff)

    if diff < min:
        min = zahyo[i+1] - zahyo[i]

# print(is_odd)
# print(is_even)
if is_odd == True and is_even == True:
    print(1)
    sys.exit()

elif is_odd == True:
    print(gcd(*odds))
else:

    print(min)
#!usr/bin/env python3

def rect(a, b):
    return str(a*b) + ' ' + str((a+b)*2)

def main():
    print(rect(int(input()), int(input())))

if __name__ == '__main__':
    main()

### FIXED CODE ###

#!usr/bin/env python3

def string_two_numbers_spliter():
    a, b = [int(i) for i in input().split()]
    return a, b


def main():
    a, b = string_two_numbers_spliter()
    print(str(a*b) + ' ' + str((a+b) * 2))


if __name__ == '__main__':
    main()
n = input()
ns = list(map(int,input().split())
print(min(ns),max(ns),sum(ns))


### FIXED CODE ###

n = int(input())
ns = list([int(i) for i in input().split()])
print(min(ns),max(ns),sum(ns))
while:
  1

### FIXED CODE ###

def wf(this_graf):
    s = len(graf)
    for k in range(s):
        for i in range(s):
            for j in range(s):
                this_graf[i][j] = min(this_graf[i][j], this_graf[i][k] + this_graf[k][j])
    return this_graf

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(m)]
graf = [[10 ** 10 for i in range(n)] for j in range(n)]

for i, j in ab:
    graf[i - 1][j - 1] = 1
    graf[j - 1][i - 1] = 1

import copy
cnt = 0

for i, j in ab:
    this_graf = copy.deepcopy(graf)
    tmp = 0
    this_graf[i - 1][j - 1] = 10 ** 10
    this_graf[j - 1][i - 1] = 10 ** 10
    this_graf = wf(this_graf)
    for i in range(n):
        for j in range(n):
            if this_graf[i][j] == 10 ** 10:
                tmp = 1
                break
        if tmp:
            break
    cnt += tmp

print(cnt)
s=input()

s.raplace(","," ")
print(s)


### FIXED CODE ###

s = input()
ss = s.replace("," , " ")
print(ss)
s = [*input()]
t = [*input()]
s.sort()
t.sort()
t.reverse()
print("Yes" if s < t else "No")


### FIXED CODE ###

S = input()
T = input()
s = list(S)
t = list(T)
s.sort()
t.sort()
t.reverse()
print("Yes" if s < t else "No")
s=list(map(int,input().split()))
x=0
for s in 1:
  x+=1
print(x)

### FIXED CODE ###

s=input()
print(s.count("1"))
#!/usr/bin/env python3
import bisect
import heapq
import itertools
import math
import numpy as np
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from math import gcd
from operator import add, itemgetter, mul, xor
def cmb(n,r,mod):
  bunshi=1
  bunbo=1
  for i in range(r):
    bunbo = bunbo*(i+1)%mod
    bunshi = bunshi*(n-i)%mod
  return (bunshi*pow(bunbo,mod-2,mod))%mod
mod = 10**9+7
def I(): return int(input())
def LI(): return list(map(int,input().split()))
def MI(): return map(int,input().split())
def LLI(n): return [list(map(int, input().split())) for _ in range(n)]



#いまいるところ,
#listとnが与えられたときn回テレポートしたところを出力する
def now_place(li,n):
    now = 1
    for i in range(n):
        now = li[now-1]
    return now

#p回のテレポートでたどってきた道筋のルートを返す

def root(li,p):
    ans = []
    now = 1
    for j in range(p):
        ans.append(now_place(li,j+1))
    return ans



n,k = MI()
a = LI()
#薫り高い町を求めよう
#訪れた町をリストに入れていって重複が出てきたらそこが薫り高い町
#そこまでのstep数も数える
cnt = 0
place=[1]
s = a[1-1]
for i in range(n):
    if a[s-1] in place:
        town = a[s-1]
        cnt = i - 1
        break
    place.append(a[s-1])
    s = a[s-1]
#周期を求める
t = 0
now = town
for i in range(n):
    t += 1
    now = a[now-1]
    if now == town:
        break
answer = root(a,cnt+t)
if k <= cnt:
  print(answer[k-1])
else:
  print(answer[cnt+(k-cnt)%t-1])

### FIXED CODE ###

#!/usr/bin/env python3
import bisect
import heapq
import itertools
import math
import numpy as np
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from math import gcd
from operator import add, itemgetter, mul, xor
def cmb(n,r,mod):
  bunshi=1
  bunbo=1
  for i in range(r):
    bunbo = bunbo*(i+1)%mod
    bunshi = bunshi*(n-i)%mod
  return (bunshi*pow(bunbo,mod-2,mod))%mod
mod = 10**9+7
def I(): return int(input())
def LI(): return list(map(int,input().split()))
def MI(): return map(int,input().split())
def LLI(n): return [list(map(int, input().split())) for _ in range(n)]



#いまいるところ,
#listとnが与えられたときn回テレポートしたところを出力する
def now_place(li,n):
    now = 1
    for i in range(n):
        now = li[now-1]
    return now

#p回のテレポートでたどってきた道筋のルートを返す

def root(li,p):
    ans = []
    now = 1
    for j in range(p):
        ans.append(now_place(li,j+1))
    return ans



n,k = MI()
a = LI()
#訪れたところのメモがtown
town = []
#訪れたかどうかを0と1で管理
visit=[0]*n
p = 1
while visit[p-1] == 0:
    town.append(p)
    visit[p-1] = 1
    p = a[p-1]
l = town.index(p)
if k <len(town):
    print(town[k])
else:
    print(town[l + (k-l)%(len(town[l:]))])
6
30 10 60 10 60 50

### FIXED CODE ###

N = int(input())
h = list(map(int,input().split()))
cost = [10**9]*N
cost[0] = 0
cost[1] = abs(h[1]-h[0])
for i in range(2, N):
  cost[i] = min((abs(h[i-1] - h[i]) + cost[i-1]),cost[i])
  cost[i] = min((abs(h[i-2] - h[i]) + cost[i-2]), cost[i])
print(cost[-1])
input()
n = map(int,input().split())
print(min(n),max(n),sum(n))

### FIXED CODE ###

input()
n = list(map(int,input().split()))
print(min(n),max(n),sum(n))
# -*- coding: utf-8 -*-
a,b = map(str,input().split())
H1 = "1"
D1= "-1"
H = int(H1)
D = int(D1)
A = int(a)
B = int(b)
if a * b == 1:
  print("H")
else:
  print("D")

### FIXED CODE ###

# -*- coding: utf-8 -*-
a,b = map(str,input().split())
if (a == "H" and b == "H")or(a =="D" and b == "D"):
  print("H")
else:
  print("D")
N = int(input())
S = list(input())
K = int(input())

a = S[K]-1

for i in range(N):
    if S[i] != a:
        S[i] = "*"

print(''.join(S))

### FIXED CODE ###

N = int(input())
S = list(input())
K = int(input())

a = S[K-1]

for i in range(N):
    if S[i] != a:
        S[i] = "*"

print(''.join(S))
n,a,b,c,d=map(int,input().split())
a-=1
b-=1
c-=1
d-=1
s=input()
m=[0 for i in range(n)]
#a-c,b-d
#abcd
#abdc
for i in range(n):
    if s[i]=="#":
        m[i]=1
if c<d:#abcd
    if "##" in s[a:d]:
        print("NO")
            else:
print("YES")
else:#d<c abdc
    if "##" in s[a:c]:
        print("NO")
            else:
if "..." in s[b-1:d+1]:
    print("YES")
    else:
        print("NO")



### FIXED CODE ###

n,a,b,c,d=map(int,input().split())
a-=1
b-=1
c-=1
d-=1
s=input()
m=[0 for i in range(n)]
#a-c,b-d
#abcd
#abdc
for i in range(n):
  if s[i]=="#":
    m[i]=1
if c<d:#abcd
  if "##" in s[a:d]:
    print("No")
  else:
    print("Yes")
else:#d<c abdc
  if "##" in s[a:c]:
    print("No")
  else:
    if "..." in s[b-1:d+2]:
      print("Yes")
    else:
      print("No")
n=int(input())
w=[input() for i in range(n)]
flag=True
for s in w:
    if w.count(s) > 1:
        flag = False
for i in range(1,n)
    if w[i][0] != w[i-1][len(w[i-1])-1]:
        flag = False
print("Yes" if flag else "No")


### FIXED CODE ###

n=int(input())
w=[input() for i in range(n)]
flag=True
for s in w:
    if w.count(s) > 1:
        flag = False
for i in range(1,n):
    if w[i][0] != w[i-1][-1]:
        flag = False
print("Yes" if flag else "No")
import os
import sys
 
# for line in sys.stdin.readlines():
    S = map(int, line.strip().split())

    h, m, s = 0, 0, 0

    h = S/3600

    S1 = S-h*3600

    if S1:
        m = S1/60
    elif S1 == 0:
        m = 0

    if m:
        s = S1-m*60
    elif m == 0:
        s = S1

    print "%d:%d:%d" % (h, m, s)

### FIXED CODE ###

S =input()
h = int(int(S / 60) / 60)
m = int(S/60) % 60
s = S % (60*60) % 60
print "%d:%d:%d" % (h, m, s)
x,y = map(int,input().split())
if x == 0 and y > 0:
    print(y-x)
elif x == 0 and y < 0:
    print(1+abs(x+y))
elif y == 0 and x > 0:
    print(1+abs(x+y))
elif y == 0 and x < 0:
    print(y-x)
    
elif 0 < x and x < y:
    print(y-x)
elif 0 < x and x > y:
    print(abs(y+x)+1)
elif x < 0 and y > 0 
    print(abs(y+x)+1)
elif y < 0 and x < y:
    print(y-x)
elif x < 0 and y < x:
    print(2+abs(x-y))



### FIXED CODE ###

x,y = map(int,input().split())
if x == 0 and y > 0:
    print(y-x)
elif x == 0 and y < 0:
    print(1+abs(x+y))
elif y == 0 and x > 0:
    print(1+abs(x+y))
elif y == 0 and x < 0:
    print(y-x)
elif x < 0 and y < x:
    print(2+abs(x-y))
elif 0 < x and x < y:
    print(y-x)
elif 0 < y and x > y:
    print(2+abs(x-y))
elif 0 > y and x > y:
    print(abs(y+x)+1)
elif x < 0 and y > 0:
    print(abs(y+x)+1)
elif y < 0 and x < y:
    print(y-x)
from functools import reduce

N, Q = map(int, input())
S = input()
LR = [list(map(int, input())) for i in range(Q)]

P = []
before_a = False
for i in range(N):
  if before_a and S[i] == 'C':
    P.append(i)
    before_a = False
  elif S[i] == 'A':
    before_a = True
  else:
    before_a = False
for i in range(Q):
  ans = 0
  for num in P:
    if num-1 >= LR[i][0] and num <= LR[i][1]:
      ans += 1
  print(ans)
    


### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
LR = [list(map(int, input().split())) for i in range(Q)]

P = [0] * (N)
before_a = False
cnt = 0
for i in range(N):
  if before_a and S[i] == 'C':
    cnt += 1
    before_a = False
  elif S[i] == 'A':
    before_a = True
  else:
    before_a = False
  P[i] = cnt
for i in range(Q):
  print(P[LR[i][1]-1] - P[LR[i][0]-1])
N=int(input())
XL=[list(map(int,input().split())) for _ in range(N)]

count=0
base=[]

for i in range(N):
    sumple=list(range(XL[i][0]-XL[i][1]+1,XL[i][0]+XL[i][1]))
    for j in range(len(sumple)):
        if sumple[j] in base:
            count+=1
            break
        else:
            if j == len(sumple)-1:
                for k in range(len(sumple)):
                    base.append(sumple[k])

#print(base)
print(N-count)

### FIXED CODE ###

from operator import itemgetter

N=int(input())
XL=[list(map(int,input().split())) for _ in range(N)]

for xl in XL:
    xl.append(xl[0]+xl[1])

XL.sort(key=itemgetter(2))
#print(XL)
count=0
j=0

for i in range(1,N):
    if XL[j][2]>XL[i][0]-XL[i][1]:
        count+=1
    else:
        j=i

print(N-count)
n=int(input())
sp=[]
for i in range(n):
    s,p=input().split()
    sp.append([s,int(p),i+1])
    
sort=sorted(sp, key=lambda sp: (sp[0], -sp[1]))

for i in range(sort):
    print(i[2])
    

### FIXED CODE ###

n=int(input())
sp=[]
for i in range(n):
    s,p=input().split()
    sp.append([s,int(p),i+1])
    
sort=sorted(sp, key=lambda sp: (sp[0], -sp[1]))

for i in sort:
    print(i[2])
n=input()
x=800*n
y=200(n/15)
print x-y

### FIXED CODE ###

n=input()
x=800*n
y=200*(n/15)
print x-y