Harryxun/stf_run huggingface dataset:
def gcd(x, y):
	n = min(x, y)
	array = range(1, n + 1)
	array.reverse()
	for d in array:
		if x % d == 0 and y % d == 0:
			return d

a, b = map(int, raw_input().split(' '))

print gcd(a, b)

### FIXED CODE ###

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

a, b = map(int, raw_input().split(' '))

print gcd(a, b)
N = int(input())

if N % 2 = 0:
    print(N // 2)
else:
    print(N // 2 + 1)

### FIXED CODE ###

N = int(input())

if N % 2 == 0:
    print(N // 2)
else:
    print(N // 2 + 1)
if (a*b) % 2:
    print("Odd")
else:
    print("Even")

### FIXED CODE ###

a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
n = int(input())
s == 0
for i in n:
  s += i
if s % 9 == 0:
  print("Yes")
else:
  print("No")
  

### FIXED CODE ###

s = input()
sum = 0
for i in s:
  sum+=int(i)
if sum%9==0:
  print("Yes")
else:
  print("No")
N = input()
A = [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z]
if N in A:
    print("A")
else:
    print("a")

### FIXED CODE ###

word = input()
A = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
if word in A:
    print("A")
else:
    print("a")
a, b = map(int, input().split())
ct = 1
k = 0
while True:
    if ct >= b:
        break
    k += 1
    ct += a - 1
print(k)


### FIXED CODE ###

a = input()
b = input()
ct = 0
for i, j in zip(a, b):
    if i == j:
        ct += 1

print(ct)
n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[]
  y=[]
  for j in range(a):
    x,y=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
c=0
for i in range(n):
  l=[1]*n
  for j in range(i,n):
    #if l[j]==0:continue
    #for k in range(A[j]):
      #b=X[j][k]
      #l[b] *= Y[j][k]

if c < l.count(1):
  c=l.count(1) 
  
        
  
print(c)  
   

### FIXED CODE ###

n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[0]*a
  y=[0]*a
  for j in range(a):
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
s=0
for i in range(2**n):
  c=0
  d=0
  B=[0]*n
  for j in range(n):
    if((i >> j) & 1):
      c=c+1
      B[j]=1
  for k in range(n):
    if B[k]==1:
      for j in range(A[k]):
        if Y[k][j]!=B[X[k][j]-1]:
          d=-1
          break
    if d<0:
      break
  if s<c and d==0:
    s=c
      
      
print(s)
sn,sm = input().split(" ")
n = int(sn)
m = int(sm)
a = input().split(" ")
l = len(sa)

 
for i in range(l):
  a[i] = int a[i]
  
for i in range(m):  
  ind = a.index(max(a))
  a[ind] = a[ind] //2
  
print(sum(a))

### FIXED CODE ###

class Heap:

    # 初期化
    def __init__(self):
        self.array = []

    def num(self):
        return len(self.array)
        
    # valを追加する
    def put(self, val):
        pos = len(self.array)
        # valを末尾に追加する
        self.array.append(val)
        # valを適当な位置まで上にあげる
        self.pop_up(pos)
        
    # 最大の要素を取り出す
    def get(self):
        assert len(self.array) > 0

        val = self.array[0]
        
        # 末尾の要素を0に移動してから下に下げる
        t_val = self.array[-1]
        self.array[0] = t_val
        del self.array[-1]
        self.push_down(0)
        return val

    # posの位置の要素を適当な位置まで上げる
    def pop_up(self, pos):
        while pos > 0:
            p_pos = (pos - 1) // 2
            val = self.array[pos]
            p_val = self.array[p_pos]
        
            if val > p_val:
                self.array[pos] = p_val
                self.array[p_pos] = val
                pos = p_pos
            else:
                break
            
    def push_down(self, pos):
        while True:
            l_pos = 2 * pos + 1
            r_pos = 2 * pos + 2
            n = len(self.array)
            
            if n <= l_pos:
                # 子がいない場合
                break
            
            elif n == r_pos:
                # 子が一人の場合
                val = self.array[pos]
                l_val = self.array[l_pos]
                
                if val < l_val:
                    self.array[pos] = l_val
                    self.array[l_pos] = val
                    
                break #
            
            else:
                # 子が二人いるとき
                val = self.array[pos]
                l_val = self.array[l_pos]
                r_val = self.array[r_pos]
                
                if l_val > r_val:
                    if val < l_val:
                        self.array[pos] = l_val
                        self.array[l_pos] = val
                        pos = l_pos
                    else:
                        break
                else:
                    if val < r_val:
                        self.array[pos] = r_val
                        self.array[r_pos] = val
                        pos = r_pos
                    else:
                        break

                        
h = Heap()
sn,sm = input().split(" ")
n = int(sn)
m = int(sm)
sa_list = input().split(" ")


for sa in sa_list:
  a = int(sa)  
  h.put(a)
 
for i in range(m):  
    max_a = h.get()
    h.put(max_a // 2)

    

print(sum(h.array))
# A Dynamic Programming based Python Program for 0-1 Knapsack problem 
# Returns the maximum value that can be put in a knapsack of capacity W 
def knapSack(W, wt, val, n): 
	K = [[0 for x in range(W+1)] for x in range(n+1)] 

	# Build table K[][] in bottom up manner 
	for i in range(n+1): 
		for w in range(W+1): 
			if i==0 or w==0: 
				K[i][w] = 0
			elif wt[i-1] <= w: 
				K[i][w] = max(val[i-1] + K[i-1][w-wt[i-1]], K[i-1][w]) 
			else: 
				K[i][w] = K[i-1][w] 

	return K[n][W] 




q=list(map(int,input().split()))
n=q[0]
W=q[1]
v=[0]*n
w=[0]*n
for _ in range(n):
  r=list(map(int,input().split()))
  w[_]=r[0]
  v[_]=r[1]
  




print(knapsack(W,w,v,n))


### FIXED CODE ###

def knapSack(W, wt, val, n): 
	K = [[0 for x in range(W+1)] for x in range(n+1)] 

	
	for i in range(n+1): 
		for w in range(W+1): 
			if i==0 or w==0: 
				K[i][w] = 0
			elif wt[i-1] <= w: 
				K[i][w] = max(val[i-1] + K[i-1][w-wt[i-1]], K[i-1][w]) 
			else: 
				K[i][w] = K[i-1][w] 

	return K[n][W] 




q=list(map(int,input().split()))
n=q[0]
W=q[1]
v=[0]*n
w=[0]*n
for _ in range(n):
  r=list(map(int,input().split()))
  w[_]=r[0]
  v[_]=r[1]
  




print(knapSack(W,w,v,n))
N = int(input())
ans = 0
for i in range(N):
    x,u = input().split()
    x = float(x)

    if u == 'JPY':
        ans += x
    else:
        ans += (x**380000)
print(ans)

### FIXED CODE ###

N = int(input())
ans = 0
for i in range(N):
    x,u = input().split()
    x = float(x)

    if u == 'JPY':
        ans += x
    else:
        ans += (x*380000)
print(ans)
n = int(input())
la = []
lb = []
for i in range(n):
  a, b = map(int, input().split())
  la.append(a)
  lb.append(b)
a = statistics.median(la)
b = statistics.median(lb)
if n % 2 == 1:
  print(b - a + 1)
else:
  print((b - a) * 2 - 1)

### FIXED CODE ###

import statistics

n = int(input())
la = []
lb = []
for i in range(n):
  a, b = map(int, input().split())
  la.append(a)
  lb.append(b)
a = statistics.median(la)
b = statistics.median(lb)
if n % 2 == 1:
  print(b - a + 1)
else:
  print(int((b - a) * 2 + 1))
import itertools as ite
import math
import random

INF = 10 ** 18
MOD = 10 ** 9 + 7

N, M = map(int, raw_input().split())
E = [[] for i in range(N + 1)]
for i in range(M):
    x, y = map(int, raw_input().split())
    E[x].append(y)

m = {}
def func(pos):
    if pos in m:
        return m[pos]
    ret = 0
    for to in E[pos]:
        ret = max(ret, func(to) + 1)
    m[pos] = ret
    return ret

print max(func(i) for i in range(1, N + 1))


### FIXED CODE ###

import itertools as ite
import math
import random
import sys

INF = 10 ** 18
MOD = 10 ** 9 + 7

sys.setrecursionlimit(1000000)

N, M = map(int, raw_input().split())
E = [[] for i in range(N + 1)]
for i in range(M):
    x, y = map(int, raw_input().split())
    E[x].append(y)

m = {}
def func(pos):
    if pos in m:
        return m[pos]
    ret = 0
    for to in E[pos]:
        ret = max(ret, func(to) + 1)
    m[pos] = ret
    return ret

print max(func(i) for i in range(1, N + 1))
import sys

x = int(input())
flag = False
a = 0

while True:
    if x - a**5 <= 0:
        b_sub = pow(x - a**5,1/5)
    else:
        b_sub = (-1)*pow(x - a**5,1/5)
    # if int(b_sub) - b_sub == 0:
    if b_sub.is_integer():
        # flag = True
        print(a,int(b_sub))
        sys.exit()
    a += 1

### FIXED CODE ###

import sys

x = int(input())
flag = False
a = 0

while True:
    for b in range(-a+1,a):
        if  a ** 5 - b  ** 5 == x:
            print(a,int(b))
            sys.exit()
    a += 1
N = int(input())
a = N//7
AA = [(N-7*i)%4 for i in range(a+1)]
if 0 in AA:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N,K=(int(i) for i in input().split())
if N%K == 0:
    print(0)
else:
    print(1)
n, m = map(int, input().split())
work_list = [list(map(int, input().split())) for _ in range(n)]
work_cand = []
salary = 0
for j in range(1, m + 1):
    for i in range(n):
        if work_list[i][0] == j:
            work_cand.append(work_list[i])
            del work_list[i]
        else:
            pass
    if work_cand != []:
         work_cand.sort(key = lambda x: x[1], reverse = True)
         salary += work_cand[0][1]
         del work_cand[0]
    else:
        pass
print(salary)
            pass



### FIXED CODE ###

from operator import itemgetter
import heapq
n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
ab.sort(key = itemgetter(0))
q = []
idx = 0
ans = 0
for i in range(1, m+1):
    while idx < n:
        a, b = ab[idx]
        if a <= i:
            heapq.heappush(q, -b)
            idx += 1
        else:
            break
    if len(q) > 0:
        b = heapq.heappop(q)
        ans -= b
print(ans)
a,b,c = map(int(i) for i in input().split())
print(a+b+c)

### FIXED CODE ###

a = list(input())
for i in range(3):
    a[i] = int(a[i])
print(a[0]+a[1]+a[2])
import math
from copy import copy
di = {}
di[0] = 0
for i in range(1, 2*(10**6)+1):
    di[i] = 0
for i in range(1, 2*(10**6)+1):
    count = 0
    for j in range(int(math.log2(i))+4):
        if (i>>j)&1:
            count += 1
    di[i] = di[i%count] + 1
n = int(input())
x = list(input())
x.reverse()
count = 0
for i in x:
    if i =='1':
        count += 1
mod_p = count + 1
mod_m = count - 1
di_p = {}
di_m = {}
for i in range(n):
    di_p[i] = pow(2, i, mod_p)
    if mod_m >= 1:
        di_m[i] = pow(2, i, mod_m)
s_p = 0
s_m = 0
for i in range(n):
    if x[i] == '1':
        s_p += di_p[i]
        s_m += di_m[i]
    else:
        continue
for i in range(n-1, -1, -1):
    sm = copy(s_m)
    sp = copy(s_p)
    if x[i] == '1' and mod_m == 0:
        print(1)
    elif x[i] == '1':
        sm -= di_m[i]
        sm %= mod_m 
        print(di[sm]+1)
    else:
        sp += di_p[i]
        sp %= mod_p
        print(di[sp]+1)


### FIXED CODE ###

import math
from copy import copy
di = {}
di[0] = 0
for i in range(1, 2*(10**6)+1):
    di[i] = 0
for i in range(1, 2*(10**6)+1):
    count = 0
    for j in range(int(math.log2(i))+4):
        if (i>>j)&1:
            count += 1
    di[i] = di[i%count] + 1
n = int(input())
x = list(input())
x.reverse()
count = 0
for i in x:
    if i =='1':
        count += 1
mod_p = count + 1
mod_m = count - 1
di_p = {}
di_m = {}
for i in range(n):
    di_p[i] = pow(2, i, mod_p)
    if mod_m >= 1:
        di_m[i] = pow(2, i, mod_m)
s_p = 0
s_m = 0
for i in range(n):
    if x[i] == '1':
        s_p += di_p[i]
        if mod_m >= 1:
            s_m += di_m[i]
    else:
        continue
for i in range(n-1, -1, -1):
    sm = copy(s_m)
    sp = copy(s_p)
    if x[i] == '1' and (mod_m == 0 or mod_m == -1):
        print(0)
    elif x[i] == '1':
        sm -= di_m[i]
        sm %= mod_m 
        print(di[sm]+1)
    else:
        sp += di_p[i]
        sp %= mod_p
        print(di[sp]+1)
N, weight_capacity = (int(n) for n in input().split())
weights, values = [], []
for _ in range(N):
    w, v = (int(n) for n in input().split())
    weights.append(w)
    values.append(v)

def knapsack_dp(weight_capacity, weights, values):
    """Solve knapsack problem by dynamic programming"""
    N = len(weights)
    dp = [[0] * (weight_capacity + 1) for _ in range(len(weights) + 1)]

    for i in range(N + 1):
        for w in range(weight_capacity + 1):
            if w >= weights[i]:
                dp[i + 1][w] = max(dp[i][w], dp[i][w - weights[i]] + values[i])
            else:
                dp[i + 1][w] = dp[i][w]

    return dp[N][weight_capacity]

print(knapsack_dp(weight_capacity, weights, values))


### FIXED CODE ###

N, W = (int(n) for n in input().split())
w, v = [], []
for _ in range(N):
    w_, v_ = (int(n) for n in input().split())
    w.append(w_)
    v.append(v_)

dp = [[0] * (W + 1) for _ in range(N + 1)]

for i in range(N):
    for w_ in range(W + 1):
        if w_ >= w[i]:
            dp[i + 1][w_] = max(dp[i][w_], dp[i][w_ - w[i]] + v[i])
        else:
            dp[i + 1][w_] = dp[i][w_]

print(dp[N][W])
N = int(input())
list = [int(a) for a in input().split()]

A = sum(list)//N
ans = 0

for k in range(N):
    ans = ans + (list[j] - A) ** 2

for i in range(-100,100):
    sum = 0
    sum_new = 0
    for j in range(N):
        sum_new = sum_new + (list[j] - i) ** 2
    if(sum > sum_new):
        ans = sum_new

print(ans)


### FIXED CODE ###


N = int(input())
s = 0

for i in range(N):
    s += i+1

print(s)
N = int(input())
G = [[] for i in range(N)]
for nod in range(N):
    tmp = list(map(int, input().split()))
    for i in range(2, tmp[1]*2+1, 2):
        edge, cos = tmp[i], tmp[i+1]
        G[nod].append([edge, cos])



import heapq


def dijkstra(x):
    d = [float('inf')] * N
    d[x] = 0
    visited = {x}

    # d, u
    hq = [(0, x)]

    while hq:
        u = heapq.heappop(hq)[1]
        visited.add(u)

        for node, cost in G[u]:
            if (node not in visited) and d[node] > d[u] + cost:
                d[node] = d[u] + cost
                heapq.heappush(hq, (d[u]+cost, node))
    return d


distance = dijkstra(0)
#print(distance)
for i in range(N):
    print(i, distance[i])

N = int(input())
G = [[] for i in range(N)]
for nod in range(N):
    tmp = list(map(int, input().split()))
    for i in range(2, tmp[1]*2+1, 2):
        edge, cos = tmp[i], tmp[i+1]
        G[nod].append([edge, cos])



import heapq


def dijkstra(x):
    d = [float('inf')] * N
    d[x] = 0
    visited = {x}

    # d, u
    hq = [(0, x)]

    while hq:
        u = heapq.heappop(hq)[1]
        visited.add(u)

        for node, cost in G[u]:
            if (node not in visited) and d[node] > d[u] + cost:
                d[node] = d[u] + cost
                heapq.heappush(hq, (d[u]+cost, node))
    return d


distance = dijkstra(0)
#print(distance)
for i in range(N):
    print(i, distance[i])




### FIXED CODE ###

N = int(input())
G = [[] for i in range(N)]
for nod in range(N):
    U = list(map(int, input().split()))[2:]
    G[nod] = zip(U[0::2], U[1::2])



import heapq


def dijkstra(x):
    d = [float('inf')] * N
    d[x] = 0
    visited = {x}

    # d, u
    hq = [(0, x)]

    while hq:
        u = heapq.heappop(hq)[1]
        visited.add(u)

        for node, cost in G[u]:
            if (node not in visited) and d[node] > d[u] + cost:
                d[node] = d[u] + cost
                heapq.heappush(hq, (d[u]+cost, node))
    return d


distance = dijkstra(0)
#print(distance)
for i in range(N):
    print(i, distance[i])
A, B, C, D = map(int, input().split())
num = 0
for i in range(A, B+1):
    if i % C = 0:
        num += 1
    elif i % D = 0:
        num += 1
x_num = B - A + 1 - num
print(x_num)


### FIXED CODE ###

A, B, C, D = map(int, input().split())
def gcd(a, b):
    if a < b:
        a, b = b, a
    a, b = b, a % b
    if b == 0 :
        return a
    else:
        return gcd(a, b)
cd = C * D //gcd(C, D)
print(B - B // C - B // D + B // cd - A + 1 + (A - 1) // C + (A - 1)// D - (A - 1)// cd)
class BIT():
  def __init__(self, n):
    self.s = [0] * (n+1)
    self.n = n

  def add(self, idx, val):
    while idx < self.n+1:
      self.s[idx] += val
      idx += idx&(-idx)

  def get(self, idx):
    res = 0
    while idx > 0:
      res += self.s[idx]
      idx -= idx&(-idx)

n = int(input())
S = [ ord(s)-ord('a') for s in input()[::-1] ]
bits = [BIT(n) for i in range(26)]

for i,s in enumerate(S):
  bits[s].add(i+1,1)

Q = int(input())
ans = []
for _ in range(Q):
  flg,x,y = map(str, input().split())
  if flg == "1":
    i = int(x)
    c = ord(y) - ord('a')
    bits[S[i-1]].add(i, -1)
    bits[c].add(i, 1)
    S[i-1] = c
  else:
    l = int(x)
    r = int(y)
    res = 0
    for i in range(26):
      res += bits[i].get(r) > bits[i].get(l-1)
    ans.append(res)

for a in ans: print(a)

### FIXED CODE ###

class BIT:
  def __init__(self,n):
    self.s = [0]*(n+1)
    self.n = n
  
  def add(self,val,idx):
    while idx < self.n+1:
      self.s[idx] = self.s[idx] + val
      idx += idx&(-idx)
    return
  
  def get(self,idx):
    res = 0
    while idx > 0:
      res = res + self.s[idx]
      idx -= idx&(-idx)
    return res
 
import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.readline
 
n = int(input())
S = [ord(s) - ord('a') for s in input()[:-1]]
 
bits = [BIT(n) for i in range(26)]
 
for i,s in enumerate(S):
  bits[s].add(1,i+1)
 
Q = int(input())
ans = []
for _ in range(Q):  
  flag,x,y = input().split()

  if flag == "1":
    i = int(x)
    c = ord(y) - ord('a')
    bits[S[i-1]].add(-1,i)
    bits[c].add(1,i)
    S[i-1] = c
  else:
    l = int(x)
    r = int(y)
    res = 0
    for i in range(26):
      res += (bits[i].get(r) > bits[i].get(l-1))
    ans.append(str(res))

print("\n".join(ans))
import math
NK = input().split()
N = int(NK[0])
K = int(NK[1])
if N==1 or K==1:
    print(0)
    exit()
else:
    print(math.gcd(N,K))



### FIXED CODE ###

NK = input().split()
N = int(NK[0])
K = int(NK[1])
if N%K<K-N%K:
    print(N%K)
else:
    print(K-N%K)
N, K = map(int, input().split())
p_list = len(map(int, input().split()))

dst = 0

for i in range(N-K+1):
  p_sum = 0
  for j in range(K):
    p = p[j]
    p_sum += p/2 * (1+p)
  if p_sum > dst:
    dst = p_sum
    
print(dst)

### FIXED CODE ###

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

#期待値L
L = [0 for _ in range(N)]
for i in range(N):
    L[i] = (1+P[i])/2

#累積和S
S = [0 for i in range(N)]
S[0] = L[0]
for i in range(1, N):
    S[i] = S[i-1] + L[i]

total = S[K-1]
for i in range(N-K):
    tmp = S[i+K]-S[i]
    if total < tmp:
        total = tmp

print(total)
h, w = map(int, input().split())
a = [input() for w in range(h)]

for i in range(h)[::-1]:
    if "#" not in a[i]:
        del a[i]
        h -= 1
print(a)

n = []
for j in range(w):
    print("j=" + str(j))
    m = ["".join(t[j] for t in a)]
    if "#" in m[0]:
        n += m
print(n)

for k in range(h):
    print("".join(n[k]))


### FIXED CODE ###

h,w = input().split()
h = int(h)
w = int(w)
inp = []
count = 0
for i in range(h):
    tmp_input = list(input())
    if '#' in tmp_input:
        inp.append(tmp_input)
    else:
        count += 1
inp2 = list(map(list,zip(*inp)))
youso = []
for i in range(w):
    if "#" in inp2[i]:
        pass
    else:
        youso.append(i)
youso.reverse()
if len(youso) != 0:
    for i in range(len(youso)):
        for j in range(h-count):
            del inp[j][youso[i]]
else:
    pass
for i in range(len(inp)):
    mojiretu = ''.join(inp[i])
    print(mojiretu)
# -*- coding: utf-8 -*-

def main():
    N = input()

    if N == 1:
        print("Hello World")
        exit()
    else:
        print(int(input()) + int(input()))

if __name__ == '__main__':
    main()


### FIXED CODE ###

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

def main():
    N = input()

    if N == "1":
        print("Hello World")
        exit()
    else:
        print(int(input()) + int(input()))

if __name__ == '__main__':
    main()
import collections

n,m = map(int,input().split())
s = list(str(input()))
key = collection.deque()
lis = [[] for i in range(n)]
li = [{"A":0,"B":0} for i in range(n)]

for i in range(m):
  a,b = map(int,input().split())
  lis[a-1].append(b-1)
  lis[b-1].append(a-1)
  li[a-1][s[b-1]] += 1
  li[b-1][s[a-1]] += 1
  
ans = [0 for i in range(n)]

for i in range(n):
  if li[i]["A"] == 0 or li[i]["B"] == 0:
    key.append(i)
    ans[i] = 1
    
while len(key) > 0:
  num = key.popleft()
  for nu in lis[num]:
    li[j][s[num]] -= 1
    if li[j]["A"] == 0 or li[j]["B"] == 0:
      if ans[j] == 0:
        key.append(j)
        ans[j] = 1

if sum(ans) == n:print("No")
else:print("Yes")

### FIXED CODE ###

import collections

n,m = map(int,input().split())
s = list(str(input()))
key = collections.deque()
lis = [[] for i in range(n)]
li = [{"A":0,"B":0} for i in range(n)]

for i in range(m):
  a,b = map(int,input().split())
  lis[a-1].append(b-1)
  lis[b-1].append(a-1)
  li[a-1][s[b-1]] += 1
  li[b-1][s[a-1]] += 1
  
ans = [0 for i in range(n)]

for i in range(n):
  if li[i]["A"] == 0 or li[i]["B"] == 0:
    key.append(i)
    ans[i] = 1
    
while len(key) > 0:
  num = key.popleft()
  for nu in lis[num]:
    li[nu][s[num]] -= 1
    if li[nu]["A"] == 0 or li[nu]["B"] == 0:
      if ans[nu] == 0:
        key.append(nu)
        ans[nu] = 1

if sum(ans) == n:print("No")
else:print("Yes")
btc=380000
N=int(input())
ans=0
for i in range(N):
  x,u=input().split()
  if u=='JPY':
    ans+=int(x)
  else:
    ans+=int(x)*btc
print(ans)

### FIXED CODE ###

btc=380000
N=int(input())
ans=0
for i in range(N):
  x,u=input().split()
  if u=='JPY':
    ans+=float(x)
  else:
    ans+=float(x)*btc
print(ans)
import itertools
n=int(input())
a=[list(map(int,input().split())) for i in range(n)]
b=[]
for i in a:
	ma=i[0] + i[1]
	mi=i[0] - i[1]
	c=[mi,ma]
	b.append(c)


while True:
	count=[]
	for i in range(n):
		count.append(0)
	p=0
	d=list(itertools.combinations(range(n), 2))
	for i in d:
		p+=1
		if b[i[0]][0]<b[i[1]][0]<b[i[0]][1] or b[i[0]][0]<b[i[1]][1]<b[i[0]][1]:
			count[i[0]]+=1
			count[i[1]]+=1
	del b[count.index(max(count))]
	del b[count.index(max(count))]
	print(count)
	n-=1
	if sum(count)==0:
		break
print(len(count))

### FIXED CODE ###

N=int(input())
xl=[]
for i in range(N):
  x,l=map(int,input().split())
  xl.append([x-l,x+l])

XL=sorted(xl,key=lambda x:x[1])

w=1
robot=XL[0]
for i in XL:
  if robot[1] <= i[0]:
    w+=1
    robot=i
print(w)