Harryxun/stf_run huggingface dataset:
n, x = [int(i) for i in input().split()]

b_str = "1"
for i in range(n):
    b_str = "0" + b_str + "1" + b_str + "0"

print(b_str[:x].count("1"))

### FIXED CODE ###

n, x = [int(i) for i in input().split()]

a = [1]
p = [1]

for i in range(n):
    a.append(a[i]*2+3) 
    p.append(p[i]*2+1)

def patty_count(num, x_bot):
    if num == 0:
        return 0 if x_bot<=0 else 1
    elif x_bot<=1+a[num-1]:
        return patty_count(num-1, x_bot-1)
    else:
        return p[num-1] + 1 + patty_count(num-1, x_bot-2-a[num-1])
 
print(patty_count(n, x))
# print()
import math

N, Y = list(map(int, input().split()))

z = Y//1000 - N

for m in range(z//9 + 1):
    if (z - 9*m)%4 == 0:
        g = (z - 9*m)//4
        result = [m, g, N-m-g]
    else:
        result = [-1, -1, -1]

print(' '.join(map(str, result)))

### FIXED CODE ###

N, Y = list(map(int, input().split()))

z = Y//1000 - N
flag = False

for m in range(z//9 + 1):
    if (z - 9*m)%4 == 0:
        g = (z - 9*m)//4
        if m + g <= N:
            result = [m, g, N-m-g]
            flag = True
            break
    else:
        pass

if not flag:
    result = [-1, -1, -1]

print(' '.join(map(str, result)))
def poll_height(n):
    rtn = 0 
    for i in range(n + 1): 
        rtn += i
    return rtn 

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

difference_a_b = b - a 
print(poll_height(difference_a_b) - b)

### FIXED CODE ###

# -*- coding: utf-8 -*-
def margin0(n):
    if n < 10:
        return "00{}".format(n)
    elif n < 100:
        return "0{}".format(n)
    elif n < 1000:
        return "".format(n%1000)
    else:
        return "{}".format(n%1000 - 1)
n = int(input())
# print(n)
name = ""
if n < 1000:
    name = "ABC{}".format(margin0(n))
else:
    name = "ABD{}".format(margin0(n))
print(name[:3])
n = int(input())
x,y,h = map(int,input().split())
lst = [[] for _ in range(n)]
for i in range(101):
    for j in range(101):
        lst[0].append((i,j,h+abs(i-x)+abs(j-y)))
for i in range(n-1):
    xi,yi,hi = map(int,input().split())
    for x,y,h in lst[i]:
        if abs(x-xi)+abs(y-yi)+hi == h:
            lst[i+1].append((x,y,h))
print(*lst[n-1][0])

### FIXED CODE ###

n = int(input())
data = []
for i in range(n):
    xi,yi,hi = map(int,input().split())
    data.append((xi,yi,hi))
lst = [[] for _ in range(n)]
data.sort(key = lambda x:x[2],reverse = True)
x,y,h = data[0]
for i in range(101):
    for j in range(101):
        lst[0].append((i,j,h+abs(i-x)+abs(j-y)))
for i in range(1,n):
    xi,yi,hi = data[i]
    if hi > 0:
        for x,y,h in lst[i-1]:
            if abs(x-xi)+abs(y-yi)+hi == h:
                lst[i].append((x,y,h))
    else:
        for x,y,h in lst[i-1]:
            if abs(x-xi)+abs(y-yi) >= h:
                lst[i].append((x,y,h))
print(*lst[n-1][0])
N,A,B = map(int, input().split())

ans = 0

for n in range(1, N+1):
    if A <= sum(n) <= B:
        ans += n

print(ans)

### FIXED CODE ###

def sum(N):
    sum = 0
    while N > 0:
        sum += N%10
        N = N//10
    return sum

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

ans = 0

for n in range(1, N+1):
    if A <= sum(n) <= B:
        ans += n

print(ans)
from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop
import math
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline

M = mod = 10**9 +7
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)

def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]
def li4():return [float(i) for i in input().rstrip('\n').split(' ')]


def dfs(root):
    global ans,g
    if ans[root]:return ans[root]

    temp = 0
    if len(g[root]):temp = max(dfs(j) for j in g[root])
    ans[root] = 1 + temp
    return ans[root]

n,m = li()
g = defaultdict(set)
for i in range(m):
    a,b = li()
    g[a].add(b)

ans = [0]*(n + 1)

for j in range(1,n + 1):
    if not ans[j]:dfs(j)
print(max(ans) - 1)

### FIXED CODE ###

from bisect import bisect_left as bl
from bisect import bisect_right as br
from heapq import heappush,heappop
import math
from collections import *
from functools import reduce,cmp_to_key
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
M = mod = 10**9 +7
def factors(n):return sorted(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))
def inv_mod(n):return pow(n, mod - 2, mod)

def li():return [int(i) for i in input().rstrip('\n').split()]
def st():return input().rstrip('\n')
def val():return int(input().rstrip('\n'))
def li2():return [i for i in input().rstrip('\n')]
def li3():return [int(i) for i in input().rstrip('\n')]
def li4():return [float(i) for i in input().rstrip('\n').split(' ')]


def dfs(root):
    global ans,g
    if ans[root]:return 

    temp = 0
    for j in g[root]:dfs(j)
    if len(g[root]):temp = max(ans[j] for j in g[root])
    ans[root] = 1 + temp

n,m = li()
g = defaultdict(set)
for i in range(m):
    a,b = li()
    g[a].add(b)

ans = [0]*(n + 1)

for j in range(1,n + 1):
    if not ans[j]:dfs(j)

print(max(ans) - 1)
n = int(input())
h = [ int(_) for _ in input().split() ]
flag = True

for i in range(len(h)-1, 0, -1):
    if h[i] == h[i+1] +1:
        h[i] = h[i]-1  
        
for j in range(0,len(h)-1):
    if h[j] > h[j+1]:
        print('No')
        flag = False
        break
        
if flag == True:
    print('Yes')

### FIXED CODE ###

# ABC 136 C
n = int(input())
h = [ int(_) for _ in input().split() ]
flag = True

for i in range(len(h)-1, 0, -1):
    if h[i-1] == h[i] +1:
        h[i-1] = h[i-1]-1  
        
for j in range(0,len(h)-1):
    if h[j] > h[j+1]:
        print('No')
        flag = False
        break
        
if flag == True:
    print('Yes')
import math

def main(N, a):
    m = getlcm(N, a) - 1
    f = 0
    for i in range(N):
        f += m % a[i]
    print(f)

def getlcm(N, a):
    l = 1
    for i in range(N):
        l = l * a[i] // math.gcd(l, a[i])
    return l
    
if __name__ == '__main__':
    N = int(input())
    a = [int(i) for i in input().split()]

    main(N, a)


### FIXED CODE ###

def main(N, a):
    m = getlcm(N, a) - 1
    f = 0
    for i in range(N):
        f += m % a[i]
    print(f)

def getlcm(N, a):
    l = 1
    for i in range(N):
        l = l * a[i] // gcd_(l, a[i])
    return l

def gcd_(a, b):
    if b == 0:
        return a
    else:
        a %= b
        a, b = b, a
        return gcd_(a, b)

if __name__ == '__main__':
    N = int(input())
    a = [int(i) for i in input().split()]

    main(N, a)
a,p = map(int, input().split())

cnt = a * 3

print(int(cnt/p))

### FIXED CODE ###

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

# a,p = map(int, "1 3".split())


cnt = a * 3 + p

print(int(cnt/2))
L = int(input())
x = (l / 3)
print(pow(x, 3))

### FIXED CODE ###

l = int(input())
x = (l / 3)
print(pow(x, 3))
print("Yes" if any([input()[i:i + 2] == "AC" for i in range(len(input()) - 1)]) else "No")

### FIXED CODE ###

s = input()
print("Yes" if any([s[i:i + 2] == "AC" for i in range(len(s) - 1)]) else "No")
while 1:
   H, W = map(int, raw_input().split())
 
   if (H == 0 and W == 0): 
    break
   for i in range(H):
    if(i==0):
     print "#"*W
    elif(i==H-1):
     print "#"*W
    else:
     print "#"*
     print "."*(W-2)
     print "#"*

   print ""

### FIXED CODE ###

while True:
   H, W = map(int, raw_input().split())
 
   if (H == 0 and W == 0): 
    break
   for i in range(H):
    if(i==0):
     print "#"*W
    elif(i==H-1):
     print "#"*W
    else:
     print ("#"+"."*(W-2)+"#")

   print ""
p = int(input().split())
p.extend(int(input().split()))
p.extend(int(input().split()))
#print(p)
count_list = []
for i in range(4):
   count =  p.count(i+1)
   count_list.append(count)
#==
count_list2 = []
for j in range(2):
   count2 = count_list2.count(j+1)
   count2_list.append(count2)
#==
if(count2_list.count(1)==2 and count2_list.count(1)==2):
   print("YES")
else:
   print("NO")

### FIXED CODE ###

p_str = input().split()
p = [int(s) for s in p_str]
p_str = input().split()
p.extend([int(s) for s in p_str])
p_str = input().split()
p.extend([int(s) for s in p_str])
#print(p)
count_list = []
for i in range(4):
   count =  p.count(i+1)
   count_list.append(count)
#print(count_list)
if(count_list.count(1)==2 and count_list.count(2)==2):
   print("YES")
else:
   print("NO")
n, m = map(int,input().split())

l = [[0 for _ in range(2)] for _ in range(n)]

f = 0
con = ""

for i in range(n):
    s, c = (list(map(int,input().split())))
    if l[s-1][1] == 0 or l[s-1][0] == c:
        if s == 1 and c == 0:
            f = 1
            break
        l[s-1][0] = c
        l[s-1][1] = 1
    else:
        f = 1
        break
else:
    for j in range(n):
        if l[j][0] != 0:
            break
        else:
            f = 1
            break

if f:
    print(-1)
else:
    for i in range(n):
        con += str(l[i][0])
    print(int(con))

### FIXED CODE ###

# n = int(input())
n, m = map(int,input().split())
# l = [[0 for _ in range(n)] for _ in range(n)]
l = []
f = 0

for i in range(m):
    l.append(list(map(int,input().split())))

# print(l)

for i in range(1000):
    si = str(i)
    if len(si) == n:
        for j in range(m):
            # print(si, l)
            if si[l[j][0]-1] == str(l[j][1]):
                # print('OK')
                f = 0
            else:
                f = 1
                break
    else:
        continue
    if f == 0:
        print(si)
        exit()

print(-1)
n = int(input())
p = list(map(int. input().split()))
ans = 0
for i in range(1, n-1):
    if p[i-1] < p[i] and p[i] < p[i+1]:
        ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
p = list(map(int, input().split()))
ans = 0
for i in range(1, n-1):
    if (p[i-1] < p[i] and p[i+1] > p[i]) or (p[i-1] > p[i] and p[i+1] < p[i]):
        ans += 1
print(ans)
from fractions import gcd
A,B = int(input().split())
print((A*B) // gcd(A,B))


### FIXED CODE ###

from fractions import gcd
A,B = map(int,input().split())
print((A*B) // gcd(A,B))
n = int(input())
a = [int(i) for i in list(input())]
ans = True
a[0] -= 1
for i in range(1,n):
  if a[i]>a[i-1]:
    a[i] -= 1
  elif a[i]==a[i-1]:
    pass
  else:
    ans = False
    break
if ans==True:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n = int(input())
a = [int(i) for i in input().split()]
ans = True
a[0] -= 1
for i in range(1,n):
  if a[i]>a[i-1]:
    a[i] -= 1
  elif a[i]==a[i-1]:
    pass
  else:
    ans = False
    break
if ans==True:
  print("Yes")
else:
  print("No")
class Tree:
    value=0
    def __init__(self):
        self.kid = []
        self.value = 0

    def add_kid(self,it):
        self.kid.append(it)

    def add_val(self,val):
        self.value += val

    def calc(self,val=0):
        self.add_val(val)
        # print("called",len(self.kid))
        for i in self.kid:
            i.calc(self.value)

    def print_val(self):
        print(self.value,end=" ")

N,Q = [int(x) for x in input().split()]
ki = [Tree() for _ in range(N)]

for i in range(N-1):
    parent,kid = [int(x) for x in input().split()]
    ki[parent-1].add_kid(ki[kid-1])

for i in range(Q):
    position,val = [int(x) for x in input().split()]
    ki[position-1].add_val(val)

ki[0].calc()

for i in ki:
    i.print_val()
print()


### FIXED CODE ###

N,Q = [int(x) for x in input().split()]
ki = [0]*N
tr = [[] for _ in range(N)]

for i in range(N-1):
    a,b = [int(x)-1 for x in input().split()]
    tr[a].append(b)
    tr[b].append(a)

for i in range(Q):
    position,val = [int(x) for x in input().split()]
    ki[position-1] += val

stack =[0]
visited = set()
visited.add(0)

while stack:
    i = stack.pop()
    for j in tr[i]:
        if j in visited:
            continue
        visited.add(j)
        ki[j] += ki[i]
        stack.append(j)

for i in ki:
    print(i,end=" ")
print()
n = int(input())
list1 = []
for i in range(n):
    s,p = input().split()
    p = int(p)
    list1.append([s, p, i+1])
list1.sort()
for i in list1:
    print[i[2]]


### FIXED CODE ###

n = int(input())
list1 = []
for i in range(n):
    s,p = input().split()
    p = int(p)
    list1.append([s, -p, i+1])
list1.sort()
for i in list1:
    print(i[2])
L, R= map(int,input().split())
m = 2019
L = L % m
R = R % m
lis = list(range(L,R+1))
lis.sort()
print(lis[0]*lis[1])

### FIXED CODE ###

L, R= map(int,input().split())
m = 2019
ans = 0
if R-L < m:
    ans = m
    L = L%m
    R = R%m
    lis = list(range(L,R+1))
    lis2 = [i%m for i in lis]
    for i in range(len(lis2)):
        for j in range(i+1,len(lis2)):
            if ans > (lis2[i]*lis[j])%m:
                ans = (lis2[i]*lis[j])%m
print(ans)
import sys
N,M = map(int,input().split())
Xs = sorted(list(map(int,input().split())))
ranges = sorted([abs(Xs[i]-Xs[i-1]) for i in range(1,len(Xs))],reverse=True)
ans = Xs[M-1]-Xs[0]
for n in range(N-1):
    ans-=ranges[n]
print(ans)

### FIXED CODE ###

import sys
N,M = map(int,input().split())
if N>M:
    print(0)
    sys.exit()
Xs = sorted(list(map(int,input().split())))
ranges = sorted([abs(Xs[i]-Xs[i-1]) for i in range(1,len(Xs))],reverse=True)
ans = Xs[M-1]-Xs[0]
for n in range(N-1):
    ans-=ranges[n]
print(ans)
print('Yes' if all([i = '7' for i in input()]) else 'No')

### FIXED CODE ###

print('Yes' if any([i == '7' for i in input()]) else 'No')
N = map(int, input().split())

print( int((N[0]+N[1])/2) )

### FIXED CODE ###

import math
N = list(map(int,input().split()))

print(math.ceil((N[0]+N[1])/2))
A, B, C, D = map(int, input().split())
lw = A+B 
rw = C+D 
if lw > rw:
    print(Left)
elif lw < rw:
    print(Right)
else:
    print(Balanced)

### FIXED CODE ###

A, B, C, D = map(int, input().split())
lw = A+B 
rw = C+D 
if lw > rw:
    print('Left')
elif lw < rw:
    print('Right')
else:
    print('Balanced')
import math

def main():
    f = true
    r = []
    while f:
        n = int(input())
        if n == 0:
            break
        m = []
        for i in range(n):
            m.append(int(input()))
        r.append(math.floor((sum(m) - max(m) - min(m)/(n-2))))
    res = ''
    for j in r:
        res += str(j)
    print(j)
    
main()


### FIXED CODE ###

import math

def main():
    r = []
    while True:
        n = int(input())
        if n == 0:
            break
        m = []
        for i in range(n):
            m.append(int(input()))
        r.append(math.floor((sum(m) - max(m) - min(m))/(n-2)))
    for j in r:
        print(j)

main()
import numpy as np

n = int(input())
h = list(map(int, input().split()))

s = 0

for i in range(max(h)+1):
    flag = False
    for j in range(n):
        if flag and h[j] == 0:
            s += 1
            flag = False
        elif not flag and h[j] > 0:
            flag = True

        h[j] = max(h[j]-1, 0)
    if flag:
        s += 1

print(s)



### FIXED CODE ###

n = int(input())
h = list(map(int, input().split()))

s = 0

for i in range(max(h)+1):
    flag = False
    for j in range(n):
        if flag and h[j] == 0:
            s += 1
            flag = False
        elif not flag and h[j] > 0:
            flag = True

        h[j] = max(h[j]-1, 0)
    if flag:
        s += 1

print(s)
import math
N,K=map(int,input().split())
R=N-K
D=int(10**9+7)


def cnr(n,r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

for i in range(1,K+1):
    print(cnr(K-1,i-1)*cnr(R+1,i)%D)


### FIXED CODE ###

import math
N,K=map(int,input().split())
R=N-K
mod = 10**9+7    
def cnr(n,r):
    a=math.factorial(n)
    b=math.factorial(n - r)
    c=math.factorial(r)
    return a//(b*c)

# def cmb(n, r, mod):
#     if ( r<0 or r>n ):
#         return 0
#     r = min(r, n-r)
#     return g1[n] * g2[r] * g2[n-r] % mod


# N = 10**5
# g1 = [1, 1]
# g2 = [1, 1]
# inverse = [0, 1]

# for i in range( 2, N + 1 ):
#     g1.append( ( g1[-1] * i ) % mod )
#     inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
#     g2.append( (g2[-1] * inverse[-1]) % mod )


for i in range(1,K+1):
    if R+2>i:
        print(cnr(K-1,i-1)*cnr(R+1,i)%mod)
    else:
        print(0)
h, w=map(int, input().split())
a=[]
visited=[[True for i in range(w)] for j in range(h)]
need_visited=[[h+w for i in range(w)] for j in range(h)]
stack=[]
for i in range(h):
    a.append(list(input()))

for i in range(h):
    for j in range(w):
        if a[i][j]=="#":
            stack.append([i, j])
            need_visited[i][j]=0
            visited=False



dx=[1, -1, 0, 0]
dy=[0, 0, 1, -1]


while len(stack)!=0:
    now_point=stack.pop(0)
    now_y=now_point[0]
    now_x=now_point[1]
    for i in range(4):
        if 0<=now_x+dx[i]<=w-1 and 0<=now_y+dy[i]<=h-1:
            if a[now_x+dx[i]][now_y+dy[i]]==".":
                if visited:
                    need_visited[now_x+dx[i]][now_y+dy[i]]=need_visited[now_x][now_y]+1
                    stack.append([now_x+dx[i], now_y+dy[i]])
max_list=[]
for i in range(h):
    max_list.append(max(need_visited[i]))
print(max(max_list))


### FIXED CODE ###

from collections import deque

H, W = [int(x) for x in input().split()]
cell = [list(input()) for i in range(H)]

painted = deque()
for h in range(H):
    for w in range(W):
        if cell[h][w] == '#':
            painted.append([h, w, 0])

ans = 0
while len(painted) > 0:
    blackcell = painted.popleft()
    for dy, dx in [[1, 0], [0, 1], [-1, 0], [0, -1]]:
        nh = blackcell[0] + dy
        nw = blackcell[1] + dx
        d = blackcell[2]
        if 0 <= nh < H and 0 <= nw < W and cell[nh][nw] == '.':
            cell[nh][nw] = '#'
            painted.append([nh, nw, d + 1])
        ans = d

print(ans)
import os
import sys

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

N = int(sys.stdin.readline())
X = list(map(int, sys.stdin.readline().split()))
L = int(sys.stdin.readline())
Q = int(sys.stdin.readline())
AB = [list(map(int, sys.stdin.readline().split())) for _ in range(Q)]

N += 2
X = [X[0]] + X + [X[-1]]
X = np.array(X, dtype=int)
# rdp[d][i]: i番のホテルから(2^d)日で何個右までいけるか
rdp = np.zeros((N.bit_length(), N), dtype=int)
rdp[0] = np.searchsorted(X, X + L, side='right') - np.arange(N) - 1
for d in range(1, N.bit_length()):
    rdp[d] = rdp[d - 1] + rdp[d - 1][np.arange(N) + rdp[d - 1]]

X = -X[::-1]
# ldp[d][i]: i番のホテルから(2^d)日で何個左までいけるか
ldp = np.zeros((N.bit_length(), N), dtype=int)
ldp[0] = np.searchsorted(X, X + L, side='right') - np.arange(N) - 1
for d in range(1, N.bit_length()):
    ldp[d] = ldp[d - 1] + ldp[d - 1][np.arange(N) + ldp[d - 1]]


# print(rdp)
# print(ldp)


def solver(l, r):
    ret = 0
    while l < r:
        d = np.searchsorted(rdp[:, l], r - l)
        if rdp[d, l] == r - l:
            ret += 2 ** d
            break
        if d > 0:
            d -= 1
        ret += 2 ** d
        l += rdp[d, l]
    return ret


def solvel(l, r):
    r = N - r - 1
    l = N - l - 1
    ret = 0
    while l < r:
        d = np.searchsorted(ldp[:, l], r - l)
        if ldp[d, l] == r - l:
            ret += 2 ** d
            break
        if d > 0:
            d -= 1
        ret += 2 ** d
        l += ldp[d, l]
    return ret


# print(np.searchsorted([1, 2, 5, 8, 9], 3))
# print(np.searchsorted([1, 2, 5, 8, 9], 4))
# print(np.searchsorted([1, 2, 5, 8, 9], 5))
# print(np.searchsorted([1, 2, 5, 8, 9], 6))
# print(np.searchsorted([1, 2, 5, 8, 9], 7))
# print()

for a, b in AB:
    if a < b:
        r = solver(a, b)
    else:
        r = solvel(a, b)
    print(r)


### FIXED CODE ###

import os
import sys

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

N = int(sys.stdin.readline())
X = list(map(int, sys.stdin.readline().split()))
L = int(sys.stdin.readline())
Q = int(sys.stdin.readline())
AB = [list(map(int, sys.stdin.readline().split())) for _ in range(Q)]

N += 2
X = [X[0]] + X + [X[-1]]
X = np.array(X, dtype=int)
# dp[d][i]: i番のホテルから(2^d)日で何個右までいけるか
dp = np.zeros((N.bit_length() + 1, N), dtype=int)
dp[0] = np.searchsorted(X, X + L, side="right") - 1
for d in range(1, N.bit_length() + 1):
    dp[d] = dp[d - 1][dp[d - 1]]
dp = dp.tolist()


def solve(l, r):
    ret = 0
    d = len(dp) - 1
    while l + 1 < r:
        while d > 0 and dp[d][l] >= r:
            d -= 1
        ret += 1 << d
        l = dp[d][l]
    if l < r:
        ret += 1
    return ret


ans = []
for a, b in AB:
    ans.append(solve(min(a, b), max(a, b)))
print(*ans, sep='\n')
s = list(map(int,input().split()))
print(s[0][0].upper()+s[1][0].upper()+s[2][0].upper())

### FIXED CODE ###

s = list(input().split())
print(s[0][0].upper()+s[1][0].upper()+s[2][0].upper())
from collections import defaultdict
n = int(input())
li = []
for i in range(n):
    xi,yi = map(int,input().split())
    li.append((xi,yi))
if n == 1:
    print(1)
dic = defaultdict(int)
for i in range(n):
    for j in range(n):
        if i != j:
            xi = li[i][0]
            yi = li[i][1]
            xj = li[j][0]
            yj = li[j][1]
            dic[(xi-xj,yi-yj)] += 1
print(n-max(dic.values()))

### FIXED CODE ###

from collections import defaultdict
n = int(input())
li = []
for i in range(n):
    xi,yi = map(int,input().split())
    li.append((xi,yi))
if n == 1:
    print(1)
    exit()
dic = defaultdict(int)
for i in range(n):
    for j in range(n):
        if i != j:
            xi = li[i][0]
            yi = li[i][1]
            xj = li[j][0]
            yj = li[j][1]
            dic[(xi-xj,yi-yj)] += 1
print(n-max(dic.values()))
#coding:utf-8
N,M=map(int,raw_input().split())
A=map(int,raw_input().split())
dp=[-1 for i in range(N + 1)]
Cost={(i+1):v for i,v in enumerate([2,5,5,4,5,6,3,7,6])}

for a in A:
    dp[Cost[a]]=1
for n in range(N+1):
    for a in A:
        if dp[n-Cost[a]] != -1:
            dp[n]=max(dp[n], dp[n-Cost[a]]+1)
k=dp[N]
n=N
buf=[]
if dp[N]>=2:
    for i in range(dp[N]-1):
        b=-1
        for a in A:
            if dp[n-Cost[a]] == k-1:
                b=max(b,a)
            
        k-=1
        n-=Cost[b]
        buf.append(b)
b=-1
for a in A:
    if Cost[a] == n:
        b=max(b,a)
buf.append(b)
print("".join(map(str,buf)))







### FIXED CODE ###

#coding:utf-8
N,M=map(int,raw_input().split())
A=map(int,raw_input().split())
dp=[-1 for i in range(10**4 + 1)]
Cost={(i+1):v for i,v in enumerate([2,5,5,4,5,6,3,7,6])}

for a in A:
    dp[Cost[a]]=1
for n in range(2,N+1):
    for a in A:
        if n-Cost[a]>=0 and dp[n-Cost[a]] != -1:
            dp[n]=max(dp[n], dp[n-Cost[a]]+1)
k=dp[N]
n=N
buf=[]
for i in range(dp[N]-1):
    b=-1
    for a in A:
        if n-Cost[a]>=0 and dp[n-Cost[a]] == k-1:
            b=max(b,a)
    k-=1
    n-=Cost[b]
    buf.append(b)
b=-1
for a in A:
    if Cost[a] == n:
        b=max(b,a)
buf.append(b)   
print("".join(map(str,buf)))
# to enable variable use in global
global tree, point

# v : current node, f : parent node 
def dfs(v, f):
    global tree, point
    for next_v in tree[v]:
        if next_v == f:
            continue
    
        point[next_v] += point[v]
        dfs(next_v, v)

n, q = list(map(int,input().split()))
# initialize global variables
tree = [[]*n for i in range(n)]
point = [0] * n

for _ in range(n-1):
    a, b = list(map(int, input().split()))

    tree[a-1].append(b-1)
    tree[b-1].append(a-1)

for _ in range(q):
    p, x = list(map(int, input().split()))

    point[p-1] += x

dfs(0, 0)
print(*point)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)

# to enable variable use in global
global tree, point

# v : current node, f : parent node 
def dfs(v, f):
    global tree, point
    for next_v in tree[v]:
        if next_v == f:
            continue
    
        point[next_v] += point[v]
        dfs(next_v, v)

n , q = map(int, input().split())
tree = [[] for _ in range(n)]
point = [0] * n
for _ in range(n - 1):
    a , b = map(int,input().split())
    tree[b - 1].append(a - 1)
    tree[a - 1].append(b - 1)

for _ in range(q):
    p , x = map(int, input().split())
    point[p - 1] += x

dfs(0, 0)
print(*point)