Harryxun/stf_run huggingface dataset:
import math

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

cd = c * d // math.gcd(c, d)

res_b = b - b // c - b // d + b // cd
a -= 1
res_a = a - a // c - a // d + a // cd


print(res_b - res_a)


### FIXED CODE ###


def gcd(x, y):
    while x % y > 0:
        x, y = y, x % y
    return y

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

cd = c * d // gcd(c, d)

res_b = b - b // c - b // d + b // cd
a -= 1
res_a = a - a // c - a // d + a // cd

print(res_b - res_a)
N = int(input())
A = list(map(int, input().split()))
AA = {}
t = 0
for a in A:
	t += a
	if a in AA:
		AA[a] += 1
	else:
		AA[a] = 1

Q = int(input())
ans = []
for i in range(Q):
	b, c = list(map(int, input().split()))
	if b in AA:
		if c not in AA:
			AA[c] = 0
		AA[c] += AA[b]
		t += (c - b) * AA[b]
		ans += [t]
		del AA[b]
	else:
		ans += [ans[-1]]
[print(a) for a in ans]

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
AA = {}
t = 0
for a in A:
	t += a
	if a in AA:
		AA[a] += 1
	else:
		AA[a] = 1

Q = int(input())
ans = []
for i in range(Q):
	b, c = list(map(int, input().split()))
	if b in AA:
		if c not in AA:
			AA[c] = 0
		AA[c] += AA[b]
		t += (c - b) * AA[b]
		ans += [t]
		del AA[b]
	else:
		ans += [t]
[print(a) for a in ans]
while True:s = int(input())
    if '?' in s:break
    print(eval(s))


### FIXED CODE ###

while 1:
    s = input()
    if '?' in s:break
    print(int(eval(s)))
import math
n = int(input())
a = list(map(int,input().split()))

ans = math.gcd(a[0],a[1])
for i in range(2,n):
    ans = math.gcd(ans,a[i])
print(ans)

### FIXED CODE ###

import fractions
n = int(input())
a = list(map(int,input().split()))

ans = fractions.gcd(a[0],a[1])
for i in range(2,n):
    ans = fractions.gcd(ans,a[i])
print(ans)
li = list(input())

for i in range(len(li)):
    if i % 2 == 0:
        if len[i] == "R":
            print("No")
            quit()
    else:
        if len[i] == "L":
            print("No")
            quit()
print("Yes")


### FIXED CODE ###

li = list(input())

for i in range(len(li)):
    if i % 2 == 1:
        if li[i] == "R":
            print("No")
            quit()
        else:
            continue
    else:
        if li[i] == "L":
            print("No")
            quit()
        else:
            continue
print("Yes")
n,l=map(int,input().split)
s=[input() for _ in range (n)]

s.sort()

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

### FIXED CODE ###

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

s.sort()

ans=s[0]
for i in range (1,n):
  ans+=s[i]
  
print(ans)
from collections import deque
n=int(input())
A=deque(sorted(list(map(int,input().split()))))
B=[]
while len(A)!=2:
    x,y=A.popleft(),A.pop()
    A.append(x-y)
    B.append([x,y])
    A=sorted(A)

B.append([A[-1],A[0]])
print(A[-1]-A[0])
for i in B:
    print(*i)

### FIXED CODE ###

n=int(input())
A=sorted(list(map(int,input().split())))

XY=[]
left,right=A[0],A[-1]
for i in range(1,n-1):
    num=A[i]
    if num<0:
        XY.append([right,num])
        right -=num
    else:
        XY.append([left,num])
        left -=num
XY.append([right,left])
print(right-left)
for x,y in XY:print(x,y)
N,K = (int(i) for i in input().split())
K += 2 #とれる範囲
S = input()
S = [s for s in S]
cnt = []
last = S[0]
c = 0

for s in S:
    if s == last:
        c += 1
    else:
        cnt.append(c)
        c = 1
        last = s

cnt.append(c)
cnt.extend([0,0,0])
hold = sum([cnt[n] for n in range(K+1)])
ans = [hold]
for i in range(1,len(cnt)-K):
    #right => cnt[i-1]
    #left => cnt[i+K]
    ans.append(hold-cnt[i-1]+cnt[i+K])
    hold = sum([cnt[n+i] for n in range(K+1)])
print(max(ans))


### FIXED CODE ###

a,b = (int(i) for i in input().split())
h = 0

if a > b:
  h = a
  a = a-1
else:
  h = b
  b = b-1

if a > b:
  print(h+a)
else:
  print(h+b)
import numpy as np

n = int(input())

a = np.array(list(map(int, input().split())))
d = [0] * n
s = {}

for i in a:
  d[i] += 1
  
sum = 0
for k in d:
  if k>1:
    sum += (k*(k-1))//2

for i in range(n):
  nd = d[a[i]]
  ans = sum-(nd*(nd-1))//2
  nd -= 1
  if nd>1:
    ans += (nd*(nd-1))//2
  print(ans)


### FIXED CODE ###

import numpy as np

n = int(input())

a = np.array(list(map(int, input().split())))
d = [0] * (n+1)
s = {}

for i in a:
  d[i] += 1
  
sum = 0
for k in d:
  if k>1:
    sum += (k*(k-1))//2

for i in range(n):
  ans=sum-d[a[i]]+1
  print(ans)
N, K = map(int,input().split())
S = input()
S[K-1] = S[K-1].lower()
print(S)


### FIXED CODE ###

N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()
print("".join(S))
a = int(input())
s = input()

if len(a) >= 3200:
    print(s)
else:
    print("red")

### FIXED CODE ###

a = int(input())
s = input()

if a >= 3200:
    print(s)
else:
    print('red')
# C - Sqrt Inequality
import math
import decimal
a,b,c = input().split()
a,b,c = map(decimal.Decimal,[a,b,c])
rta,rtb,rtc = map(math.sqrt,[a,b,c])
rta,rtb,rtc = map(srt,[rta,rtb,rtc])
rta,rtb,rtc = map(decimal.Decimal,[rta,rtb,rtc])

if rta + rtb < rtc:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

# C - Sqrt Inequality
import decimal
a,b,c = input().split()
a,b,c = map(decimal.Decimal,[a,b,c])
sqrt = decimal.Decimal(0.5)
if a**sqrt + b**sqrt < c**sqrt:
    print('Yes')
else:
    print('No')
while True:
    H, W = [int(i) for i in input().split()]
    if H == W == 0:
        break

    for h in range(H):
        for w in range(W):
            if h == 0 or h == H - 1 or w == 0 or w == W - 1:
                print('#', end='')
            else:
                print('.', end='')

         print()

    print()

### FIXED CODE ###

while True:
    H, W = [int(i) for i in input().split()]
    if H == W == 0:
        break
      
    for h in range(H):
        for w in range(W):
            if h == 0 or h == H-1 or w == 0 or w == W - 1:
                print('#', end='')
            else:
                print('.', end='')
        print()
      
    print()
w, h, n = map(int, input().split())
ans_list = [0,0,w,h]
for i in range(n):
    x, y, a = map(int, input().split())
    if a == 1:
        ans_list[0] = x
    elif a == 2:
        ans_list[2] = x
    elif a == 3:
        ans_list[1] = y
    else:
        ans_list[3] = y
print(max((ans_list[2]-ans_list[0])*(ans_list[3]-ans_list[1])),0)

### FIXED CODE ###

w, h, n = map(int, input().split())
ans_list = [0,0,w,h]
for i in range(n):
    x, y, a = map(int, input().split())
    if a == 1 and ans_list[0]<x:
        ans_list[0] = x
    elif a == 2 and ans_list[2]>x:
        ans_list[2] = x
    elif a == 3 and ans_list[1]<y:
        ans_list[1] = y
    elif a == 4 and ans_list[3]>y:
        ans_list[3] = y
    ans = (ans_list[2]-ans_list[0])*(ans_list[3]-ans_list[1])
    if ans <= 0:
        print(0)
        exit()
print(ans)
A, B, X = map(int, raw_input().split())

def price(i, A, B):
    Dig = len(str(i))
    return A * i + B * Dig

l = 0
r = 10**9 + 1

while (r-l) > 1:
    c = (r+l)/2
    Pri = price(c, A, B)
    if Pri <= X:
        l = c
    else:
        r = c

print l


### FIXED CODE ###

Day = {"SUN":7,
       "MON":6,
       "TUE":5,
       "WED":4,
       "THU":3,
       "FRI":2,
       "SAT":1}

S = raw_input()

print Day[S]
n,k=map(int,input().split())
s=input()

print(s[:k-1]+s[k-1]>lower()+s[k])


### FIXED CODE ###

n,k=map(int,input().split())
s=input()

s=s[:k-1]+s[k-1].lower()+s[k:]

print(s)
import sys


def jump(k, h, res):
  if not k:
    return 0

  if res[k] == -1:
    res[k] = jump(k-1, h, res) + abs(h[k] - h[k-1])
    if k >= 2:
      res[k] = min(res[k], jump(k-2, h, res) + abs(h[k] - h[k-2]))

  return res[k]


def main(N, H):
  res = [-1] * N

  print jump(N-1, H, res)


if __name__ == '__main__':
  for i, line_ in enumerate(sys.stdin):
    line = line_.strip()
    if line:
        if not i:
            N = int(line.strip())
        H_ = line.strip().split()
        H = [int(num) for num in H_]

  main(N, H)

### FIXED CODE ###

import sys


def jump(n, h, res):
  res[0] = 0
  res[1] = abs(h[0] - h[1])
  for i in range(2, len(res)):
      res[i] = min(res[i-1] + abs(h[i] - h[i-1]), res[i-2] + abs(h[i] - h[i-2]))

  return res[n]


def main(N, H):
  res = [0] * N

  print jump(N-1, H, res)


if __name__ == '__main__':
  H, N = None, None
  for i, line_ in enumerate(sys.stdin):
    line = line_.strip()
    if line:
        if not i:
            N = int(line.strip())
        H_ = line.strip().split()
        H = [int(num) for num in H_]
  if N is not None and H is not None:
    main(N, H)
x500 = int(input())
x100 = int(input())
x50 = int(input())
xxx = int(input())

n500 = 0
n100 = 0
n50 = 0

count = 0
for i in x500:
    if total(i, j, k) == xxx:
        count += 1
    for j in x100:
        if total(i, j, k) == xxx:
            count += 1
        for k in x50:
            if total(i, j, k) == xxx:
                count += 1
print(count)


def total(i, j, k):
    return 500 * i + 100 * j + 50 * k

### FIXED CODE ###

A, B, C, x = [int(input()) for i in range(4)]
print(sum(500 * a + 100 * b + 50 * c == x for a in range(A+1) for b in range(B+1) for c in range(C+1)))
s = input()
res = 0
for i in range(len(s)//2):
	if s[i] != s[len(s)-1-i]:
    	res += 1
print(res)

### FIXED CODE ###

s = input()
res = 0
for i in range(len(s) // 2):
    if s[i] != s[len(s)-1-i]:
        res += 1
print(res)
n = int(input())
a, b = map(int, list(str(n)))

print('Yes' if n%(a+b)==0 else 'No')

### FIXED CODE ###

n = list(input())
x = int(''.join(n))
y = sum(map(int, n))

print('Yes' if x%y==0 else 'No')
N = int(input())
 ab = [tuple(map(int,input().split())) for i in range(N)]
 cd = [tuple(map(int,input().split())) for i in range(N)]
 result = []
 for i in range(N):
     xr , yr = ab[i]
     xb, yb = cd[i]
     if xr < xb or yr < yb:
         print(xr, yr, xb, yb)
         result.append('BINGO!!!')
 print(len(result))

### FIXED CODE ###

N = int(input())
ab = sorted([ tuple(map(int, input().split())) for x in range(N)], key=lambda x:x[1],reverse=True)
cd = sorted([ tuple(map(int, input().split())) for x in range(N)])
resultx = []
resulty = []
for xb, yb in list(cd):
    for xr, yr in list(ab):
        if (xr, yr) in resultx:
            continue
        if xr < xb and yr < yb:
            resultx.append((xr,yr))
            resulty.append((xb,yb))
            break

print(len(resultx))
a, b = map(int, input().split())
if （a * b） % 2 == 0:
  print('Even')
else:
  print('Odd')

### FIXED CODE ###

print(input().count('1'))
N,K,Q=map(int,input().split())
QL=[0]*Q
NL=[K-Q]*N
for i in range(Q):
  L[i]=int(input())
  NL[L[i]]+=1
for i in range(N):
  print('Yes' if NL[i]>0 else 'No')
  

### FIXED CODE ###

N,K,Q=map(int,input().split())
QL=[0]*Q
NL=[K-Q]*N
for i in range(Q):
  QL[i]=int(input())-1
  NL[QL[i]]+=1
for i in range(N):
  print('Yes' if NL[i]>0 else 'No')
MAX_INT = 10**6
N, M = map(int, input().split())
room = [set() for _ in range(N+1)]
for i in range(M):
    a, b = map(int, input().split())
    room[a].add(b)
    room[b].add(a)

dis = [MAX_INT] * (N + 1)
sign = [-1] * (N + 1)
dis[1] = 0
aa = [False] * (N + 1)
def sign_root(n):
    if not aa[n]:
        for i in room[n]:
            if dis[n] + 1 < dis[i]:
                sign[i] = n
                dis[i] = dis[n] + 1
                sign_root(i)
    aa[n] = True
sign_root(1)
if MAX_INT in dis[2:]:
    print("No")
else:
    print("Yes")
    for i in sign[2:]:
        print(i)

### FIXED CODE ###

MAX_INT = 10**6
N, M = map(int, input().split())
room = [set() for _ in range(N+1)]
for i in range(M):
    a, b = map(int, input().split())
    room[a].add(b)
    room[b].add(a)

dis = [MAX_INT] * (N + 1)
sign = [-1] * (N + 1)
dis[1] = 0
def sign_root(n):
    nxt = []
    for i in room[n]:
        if dis[n] + 1 < dis[i]:
            sign[i] = n
            dis[i] = dis[n] + 1
            nxt += [i]
    return nxt

nxt = sign_root(1)
while nxt != []:
    for i in nxt.copy():
        nxt.pop(0)
        nxt += sign_root(i)
if MAX_INT in dis[2:]:
    print("No")
else:
    print("Yes")
    for i in sign[2:]:
        print(i)
(n, x) = map(int, input().split())
l = list(map(int, input().split()))

count = 0
for i in range(n + 2):
    if count > x:
        ans = i
        break
    else:
        count += l[i]
print(ans)

### FIXED CODE ###

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

d = 0
ans = 0
for i in l:
    if d > x:
        break
    else:
        d += i
        ans += 1

if x >= sum(l):
    ans += 1

print(ans)
n, m = map(int, input().split())
a = sorted(list(map(int, input().split())))
bc = [list(map(int, input().split())) for i in range(m)]
sort_bc = sorted(bc, key = lambda x:x[1], reverse = True)
k = 0
for i in sort_bc:
    for j in range(i[0]):
        if i[1] > a[k]:
            a[k] = i[1]
            k += 1
print(sum(a))

### FIXED CODE ###

n, m = map(int, input().split())
a = sorted(list(map(int, input().split())))
bc = [list(map(int, input().split())) for i in range(m)]
sort_bc = sorted(bc, key = lambda x:x[1], reverse = True)
cnt_a = 0
cnt_m = 0
for i in sort_bc:
    if cnt_a <= n - 1:
        for j in range(i[0]):
            if cnt_a <= n - 1:
                if i[1] > a[cnt_a]:
                    a[cnt_a] = i[1]
                    cnt_a += 1
                else:
                    break
    else:
        break
print(sum(a))
#16D8101014F Kurume Ryunosuke 久留米竜之介 2018/5/16 Python3
n = int(input())
box = set()

for i in range(n):
    tmp,mozi= input().split()
    
    if tmp == "find":
        if word in box:
            print("yes")
        else:
            print("no")
    else:
        dic.add(mozi)



### FIXED CODE ###

#16D8101014F Kurume Ryunosuke 久留米竜之介 2018/5/16 Python3
n = int(input())
box = set()

for _ in range(n):
    tmp,mozi= input().split()
    
    if tmp == "find":
        if mozi in box:
            print("yes")
        else:
            print("no")
    else:
        box.add(mozi)
# -*- coding: utf-8 -*-
"""
Created on Sun Oct  7 22:06:12 2018
ABC073D
@author: maezawa
"""
import itertools as itr
import sys
#input = sys.stdin.readline

n, m, r = list(map(int, input().split()))
rarray = list(map(int, input().split()))
adjmatrix = [[10**10]*(n+1) for _ in range(n+1)]
for i in range(1,n+1):
    adjmatrix[i][i] = 0
    
for i in range(m):
    a, b, c = list(map(int, input().split()))
    if adjmatrix[a][b] > c:
        adjmatrix[a][b] = c
        adjmatrix[b][a] = c

#print(abc)

# Warshall-Floyd Algorithm
for k in range(1,n+1):
    for i in range(1,n+1):
        for j in range(1,n+1):
            adjmatrix[i][j] = min([adjmatrix[i][j],
                      adjmatrix[i][k] + adjmatrix[k][j]]
            #adjmatrix[j][i] = adjmatrix[i][j]
        
#print(*adjmatrix, sep='\n')
    
# search for ri to rj
mincnt = 10*10
for route in itr.permutations(rarray):
    cnt = 0
    for i in range(len(rarray)-1):
        cnt += adjmatrix[route[i]][route[i+1]]
    if cnt < mincnt:
        mincnt = cnt

print(mincnt)
        
        

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Mon Oct  8 10:17:39 2018

@author: maezawa
"""

import math
from itertools import permutations

#フロイド・ワーシャル
def warshall_floyd(glath):
	
	for k in range(len(glath)):
		for i in range(len(glath)):
			for j in range(len(glath[i])):
				if glath[i][j] > glath[i][k] + glath[k][j]:
                                   glath[i][j] = glath[i][k] + glath[k][j]
                                   glath[j][i] = glath[i][k] + glath[k][j]				
	return glath

N, M ,R= [int(x) for x in str(input()).split()]  #グラフの大きさ 
r=[int(x) for x in str(input()).split()]
graph=[[float("inf")]*N for i in range(N)]


for i in range(M):
	a,b,c=[int(x) for x in str(input()).split()]
	#if a in r and b in r:
	graph[a-1][b-1]=c
	graph[b-1][a-1]=c

#all_cost=warshall_floyd(select_graph)
all_cost=warshall_floyd(graph)


max_count=float("inf")
for i in permutations(r):
        cost=0
        for j in range(len(i)-1):                
                cost+= all_cost[i[j]-1][i[j+1]-1]       
        max_count=min(max_count,cost)

print(max_count)
n,X = map(int,input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
a=[]
for i in range(n-1):
        a.append(x[i+1]-x[i])        

def gcd(m,n):
        while n!=0:
                m,n = n,m%n
        return m

ans=min(a)
for j in a:
        if j%ans != 0:
                ans = gcd(j,ans)
print(ans)

### FIXED CODE ###

n,X = map(int,input().split())
x = list(map(int,input().split()))
x.append(X)
x.sort()
a=[]
for i in range(len(x)-1):
        a.append(x[i+1]-x[i])        

def gcd(m,n):
        while n:
                m,n = n,m%n
        return m

ans=a[0]
for j in a:
        if j%ans != 0:
                ans = gcd(j,ans)
print(ans)
H,N = map(int,input().split(" "))
lis = []
lis_append = lis.append
dp = [10**8+1 for _ in range(H+1)]
for i in range(N):
    a,b = map(int,input().split(" "))
    dp[a] = b
    lis_append([a,b])


for i in range(H+1):
    for a,b in lis:
        if i + a <= H:
            dp[i+a] = min(dp[i+a],dp[i]+b)
        else:
            dp[-1] = min(dp[-1],dp[i]+b)
print(dp[-1])

### FIXED CODE ###

H,N = map(int,input().split(" "))
lis = []
lis_append = lis.append
dp = [2**50 for _ in range(H+1)]
ans = 2**60
for i in range(N):
    a,b = map(int,input().split(" "))
    if a >= H:
        ans = min(ans,b)
    lis_append([a,b])

dp[0] = 0
for i in range(H+1):
    for a,b in lis:
        if i + a <= H:
            dp[i+a] = min(dp[i+a],dp[i]+b)
        else:
            dp[H] = min(dp[H],dp[i]+b)

ans = min(ans,dp[H])
print(ans)
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

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

visited = [False]*n
calculated = [False]*n
dp = [1]*MAXV # Vからスタートしたときの最長経路。頂点の個数ベースで経路の長さを数えるので、初期値は1

def dfs(v):
    if visited[v]:
        if not calculated[v]:
            return -1 # 計算が終わっていない頂点を2度訪れるのはループがあるということ
        return dp[v]
    visited[v] = True
    for u in to[v]: # 全ての辺をなめる
        res = dfs(u)
        if res == -1: return -1 # ループがあれば-1を返す
        dp[v] = max(dp[v], res+1)
    calculated[v] = True
    return dp[v]

def main():
    to=[[] for i in range(n)]
    for i in range(m):
        a,b=map(int,input().split())
        a-=1
        b-=1
        to[a].append(b)
    ans = 0
    for i in range(n):
        res = dfs(i)
        ans = max(ans, res)
    print(ans)
    return

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline

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

visited = [False]*n
calculated = [False]*n
dp = [1]*n# Vからスタートしたときの最長経路。頂点の個数ベースで経路の長さを数えるので、初期値は1

def dfs(v):
    if visited[v]:
        if not calculated[v]:
            return -1 # 計算が終わっていない頂点を2度訪れるのはループがあるということ
        return dp[v]
    visited[v] = True
    for u in to[v]: # 全ての辺をなめる
        res = dfs(u)
        if res == -1: return -1 # ループがあれば-1を返す
        dp[v] = max(dp[v], res+1)
    calculated[v] = True
    return dp[v]

def main():
    for i in range(m):
        a,b=map(int,input().split())
        a-=1
        b-=1
        to[a].append(b)
    ans = 0
    for i in range(n):
        res = dfs(i)
        ans = max(ans, res)
    print(ans-1)
    return

if __name__ == '__main__':
    main()
s = input()
S = [int(s[i]) for i in range(len(s))]
# print(S)
count = 0
before = 0
while 1:
    #print("S:", S)
    is_continue = False
    # print(len(S))
    deleted = False
    for i in range(before, len(S) - 1):
        #print(before, i)
        #print(S[i], S[i + 1])
        # print(S)
        if S[i] != S[i + 1]:
            # print(count)
            del S[i]
            del S[i]
            count += 2
            is_continue = True
            if deleted:
                pass
            else:
                before = i - 1
                deleted = True
            break
    if not is_continue:
        break
print(count)


### FIXED CODE ###

s = input()
S = [int(s[i]) for i in range(len(s))]
# print(S)
count = 0
before = 0
while 1:
    #print("S:", S)
    is_continue = False
    # print(len(S))
    #deleted = False
    for i in range(max([before, 0]), len(S) - 1):
        #print(before, i)
        #print(S[i], S[i + 1])
        # print(S)
        if S[i] != S[i + 1]:
            # print(count)
            del S[i]
            del S[i]
            count += 2
            is_continue = True
            before = i - 2
            #deleted = True
            break
    if not is_continue:
        break
print(count)
import sys
a, b = map(int,input().split())
sum = a
count = 1
if b == 1:
        print(0)
else:
        for i in range(10000):
                if sum < b:
                        sum += (a-1)
                        count += 1
                else:
                        break
        print(count)

### FIXED CODE ###

import sys
# sys.setrecursionlimit(1000000)
# N, Q = map(int, sys.stdin.readline().split())
# a_b = [list(map(int, sys.stdin.readline().split())) for _ in range(N-1)]
# p_x = [list(map(int, sys.stdin.readline().split())) for _ in range(Q)]
n = int(input())
h_l = list(map(int,input().split()))
c_l = [0 for _ in range(n)]
s = 0
# for i in range(n-1):
while s < n-1:
        for j in range(0,n-s-1):
                if h_l[s+j] >= h_l[s+1+j]:
                        c_l[s] += 1
                else:
                        break
        s = s+c_l[s]+1
        
# print(c_l)
print(max(c_l))
X, t = map(int, input().split())

if t >= x:
    print(0)

else:
    print(X-t)


### FIXED CODE ###

X, t = map(int, input().split())

if t >= X:
    print(0)

else:
    print(X-t)
s = input().rstrip()
2 print('x' * len(s))

### FIXED CODE ###

S=input()
print('x' * len(S))
import collections
import copy
import math
from scipy.special import comb

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

n = int(input())
nums = [ int(s) for s in input().split() ]


for i in range(n):
    ans = 0

    cpl = copy.copy(nums)
    cpl.pop(i)
    ct = collections.Counter(cpl)

    for key, val in ct.items():
        if val > 1:
            ans += comb(val, 2, exact=True)
    
    print(ans)


### FIXED CODE ###




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

# counter
from collections import Counter
cntr = Counter(lst)

# combination
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

total = 0
# countSameNames
for value in cntr.values():
    if value > 1:
        total += combinations_count( value, 2 )


for l in lst:
    print(total - (cntr[l]-1))
b = input()
if b == 'A':
  print('T')
elif b == 'T':
  print('A')
elif b == 'C':
  print('G')
elif b == 'G':
  print('C'):
  

### FIXED CODE ###

b = input()
if b == 'A':
  print('T')
elif b == 'T':
  print('A')
elif b == 'C':
  print('G')
elif b == 'G':
  print('C')
N, Y = map(int, input().split())
Payable = False
try:
    for i in range(N+1):
        for j in range(N+1-i):
            k = N-i-j
            if i*10000+j*5000+k*1000 == Y:
                print(i,j,k)
                Payable = True
                raise Exception
except Exception:
    break

if not Payable:
    print(-1, -1, -1)

             


### FIXED CODE ###

n,y = (int(i) for i in input().split())
y/=1000
payed = False
for i in range(n+1):
    if payed:
        break
    for j in range(n+1-i):
        k = n-i-j
        if k>=0:
            if i*10+j*5+k==y:
                print(i,j,k)
                payed = True
                break
if not payed:
    print(-1,-1,-1)
from collections import Counter
n = int(input())
a = list(map(int,input().split()))
cnt = Counter(a)

c = 0
for k,v in c.items():
    if v >= k:
        c += v-k
    else:
        c += v
print(c)


### FIXED CODE ###

from collections import Counter
n = int(input())
a = list(map(int,input().split()))
cnt = Counter(a)

c = 0
for k,v in cnt.items():
    if v >= k:
        c += v-k
    else:
        c += v
print(c)
N, X = map(int, input().split())
l = list(map(int, input().split()))
g = X - l[0]
from math import gcd
for i in l[1:N]:
	if i == X: continue
	g = gcd(g, abs(X-i))

print(abs(g))

### FIXED CODE ###

N, X = map(int, input().split())
l = list(map(int, input().split()))
g = X - l[0]
from fractions import gcd
for i in l[1:N]:
	if i == X: continue
	g = gcd(g, abs(X-i))

print(abs(g))