peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Wrong Answer
x,y=map(int,input().split())
ans=0
if y==0:
  if x>0:ans+=1
  ans+=abs(x)
  print(0)

if x>0 and y>0:
  if x<=y:
    ans+=abs(y-x)
  else:
    ans+=abs(y-x)+2
elif (x>0 and y<0) or (x<0 and y>0):
  ans+=abs(abs(x)-abs(y))+1
elif x<0 and y<0:
  if x<=y:
    ans+=abs(y-x)
  else:
    ans+=abs(y-x)+2
print(ans)
# Judge status: Accepted
k = int(input())
n = 0
for i in range(1, k+1):
    n = (n * 10 + 7) % k
    if n == 0:
        print(i)
        exit()
print('-1')
# Judge status: Accepted
a, b = map(int, input().split())
print(a) if a <= b else print(a-1)
# Judge status: Accepted
import fractions
A, B, C, D = map(int, input().split())
cnt = 0
ac = (A-1) // C
bc = B // C
ad = (A-1) // D
bd = B // D
gcd_b = B // (C*D//fractions.gcd(C, D))
gcd_a = (A-1) // (C*D//fractions.gcd(C, D))
total = B - A + 1
a = bc - ac
b = bd - ad
gcdx = gcd_b - gcd_a

print(total-a-b+gcdx)
# Judge status: Accepted
n,m = map(int, input().split()) 
sc = [list(map(int, input().split())) for _ in range(m)]
def check(num):
    num_str = str(num)
    if len(num_str) != n:
        return False
    for s, c in sc:
        if num_str[s-1] != str(c):
          return False
    return True

for i in range(1000):
    if check(i):
      	print(i)
      	exit()

print(-1)
# Judge status: Wrong Answer
from sys import exit
X, Y = map(int,input().split())
if X % Y == 0 or Y % X == 0: print(-1)
else:
  for i in range(10 ** 18 + 1):
    if i % X == 0 and i % Y != 0:
      print(i)
      exit()
# Judge status: Accepted
import numpy as np

n = int(input())
arr = np.array([int(i) for i in input().split()])
mod = 10 ** 9 + 7
s = 0

for i in range(60):
    c1 = np.count_nonzero(arr & 1) # 自分がnp.sumを利用したがどうしても正解になれなかった。なぜ？
    s += 2 ** i * c1 * (n - c1)
    arr >>= 1

print(s % mod)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))

stock = 0
prop = 1000
grad = -1

for i in range(n - 1):
    diff = a[i + 1] - a[i]
    if grad == -1 and diff > 0:
        trade_num = prop // a[i]
        stock = trade_num
        prop -= (trade_num * a[i])
        grad = 1
    elif grad == 1 and diff < 0:
        prop += stock * a[i]
        stock = 0
        grad = -1
if grad == 1:
    prop += stock * a[n - 1]

print(prop)
# Judge status: Accepted
a,b,x = map(int, input().split())
print(b//x - (a+x-1)//x + 1)
# Judge status: Accepted
# ABC 071: B – Not Found
a = 'abcdefghijklmnopqrstuvwxyz'
s = input()
for c in s:
    if c in a:
        a = a.replace(c, '')

print(a[0] if len(a) > 0 else 'None')
# Judge status: Wrong Answer
user_input=input("N: ")
i=len(user_input)-1
j=int(user_input)
if j>=10**(200000):
    print("its out of the limit")
else:
    number=0
    while i>=0:
        number+=int(user_input[i])
        i=i-1
if number%9==0:
    print("Yes")
else :
    print("No")
# Judge status: Accepted
alphabet = 'abcdefghijklmnopqrstuvwxyz'
s = input()
K = int(input())
ans = ''
for i in range(len(s) - 1):
    s_i = alphabet.index(s[i])
    if s[i] == 'a':
        ans += 'a'
        continue
    if (26 - s_i <= K):
        K -= 26 - s_i
        ans += 'a'
    else:
        ans += s[i]
ans += alphabet[(K + alphabet.index(s[-1])) % 26]
print(ans)
# Judge status: Wrong Answer
s = list(input())
abc = list('abcdefghijklmnopqrstuvwxyz')
abc_exist = [False] * 26

for i in range(len(s)):
  for j in range(26):
    if s[i] == abc[j]:
      abc_exist[j] = True
for k in range(26):
  if abc_exist[k] == False:
    r = abc[k]
else:
  r = 'None'
print(r)
# Judge status: Wrong Answer
x = int(input())
m500 = x // 500
m5 = (x - (x // 500) * 500) % 5

ans = m500 * 1000 + m5 * 5
print(ans)
# Judge status: Accepted
N = int(input())
*A, = map(int, input().split())
ans = 0

for i in range(N-1):
    v1, v2 = A[i], A[i+1]
    if v1<=v2:
        continue
    ans += v1-v2
    A[i+1] = v1
print(ans)
# Judge status: Accepted
import sys
input = lambda : sys.stdin.readline().rstrip()

n = int(input())
s = input()
t = input()

ans = 10**10

for i in range(n - 1, -1, -1):
    if s[i:] == t[:n-i]:
        if len(s) + len(t[n-i:]) >= n:
            ans = min(ans, len(s) + len(t[n-i:]))
if len(s) + len(t) >= n:
    ans = min(ans, len(s) + len(t))

if ans == 10**10:
    print(n)
else:
    print(ans)
# Judge status: Accepted
n=int(input());a=list(map(int,input().split()));d={}
for i in a:
  if i not in d: d[i]=1
  else: d[i]+=1
print(sum([j if i>j else j-i for i,j in d.items()]))
# Judge status: Accepted
o = input()
e = input()

s = len(o)
t = len(e)
ans = ""
for i in range(s):
  ans += o[i]
  if s-t == 1 and i == s-1: break
  ans += e[i]
print(ans)
# Judge status: Wrong Answer
a,b,x = map(int, input().split())

ax = max(0,(a-1)//x)
bx = b//x

#print(ax)
#print(bx)

print(bx-ax)
# Judge status: Accepted
# 131 B

n, l = map(int, input().split())
cmin = float('inf')
sum = 0

for i in range(1, n+1):
    f = l + i - 1
    sum += f
    if cmin >= 0:
        cmin = min(cmin, f)
    else:
        cmin = max(cmin, f)

print(sum - cmin)
# Judge status: Accepted
a, b = map(int,input().split())
if a == 1:
    if a < b:
        print('Alice')
    else:
        print('Draw')
elif b == 1:
    if a > b:
        print('Bob')
    else:
        print('Draw')
else:
    if a < b:
        print('Bob')
    elif a > b:
        print('Alice')
    else:
        print('Draw')
# Judge status: Accepted
n, m = map(int, input().split())
a = [[i for i in input()] for j in range(n)]
b = [[i for i in input()] for j in range(m)]

def match(y,x):
    result = True
    for i in range(m):
        for j in range(m):
            if a[y+i][x+j] != b[i][j]:
                result = False
    return result

flg = False
for i in range(n-m+1):
    for j in range(n-m+1):
        if match(i,j):
            flg = True

print('Yes' if flg else 'No')
# Judge status: Wrong Answer
n = int(input())
a = [int(input()) for i in range(n)]
import collections
b = collections.Counter(a)
set_a = set(a)
cnt = 0
for i in range(len(a)):
    if b[a[i]]%2 == 1:
        cnt += 1
print(cnt)
# Judge status: Accepted
n = int(input())
print(10-n//200)
# Judge status: Wrong Answer
N, M = map(int, input().split())
a_li = [input() for i in range(N)]
b_li = [input() for i in range(M)]

for i in range(N - M):
    for j in range(N - M) :
        for k in range(M) :
            if a_li[i + k][j : j + M] != b_li[k] :
                break
            if k == M - 1:
                print("Yes")
                exit()
print("No")
# Judge status: Wrong Answer
import math
x,y =map(int,input().split())
print(math.ceil(x/((y*y)+1)))
# Judge status: Wrong Answer
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

p = 0
result = 0

for i in range(n):
    p += b[i]
    if a[i] < p:
        result += a[i]
        p -= a[i]
    else:
        result += p
        p = 0

if a[n] < p:
    result += a[n]
else:
    result += p
        
print(result)
# Judge status: Accepted
def main():
    n = int(input())
    a = [None]*n
    b = [None]*n
    for i in range(n):
        a[i],b[i] = map(int, input().split())
    a.sort()
    b.sort()    
    if n&1:
        print(b[n//2]-a[n//2]+1)
    else:
        print(b[n//2-1]+b[n//2]-a[n//2]+1-a[n//2-1])
            
if __name__ == "__main__":
    main()
# Judge status: Accepted
"""
author : halo2halo
date : 23, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
W = read().decode('utf8').split()
temp = W[0][-1]
Ws = set(W)
f = True
if len(Ws) != N:
    f = False

else:
    for w in W[1:]:
        if temp == w[0]:
            temp = w[-1]
        else:
            f = False
            break
print("Yes" if f else "No")
# Judge status: Accepted
X,Y = map(int,input().split())
if X*4 < Y or X*2 > Y:
  print("No")
else:
  if Y == X*2:
    print("Yes")
  else:
    if (Y-X*2)%2==0:
      print('Yes')
    elif (Y-X*2)%2!=0:
      print('No')
# Judge status: Wrong Answer
from itertools import permutations

n = int(input())
p = list(map(int,input().split()))
q = list(map(int,input().split()))
a = -1
b = -1
count = 0
for per in permutations(range(1,n+1)):
    count += 1
    arr = [i for i in per]
    if arr==p:
        a = count
    elif arr==q:
        b = count

print(abs(a-b))
# Judge status: Accepted
a,b,h=[int(input()) for _ in range(3)]
print((a+b)*h//2)
# Judge status: Accepted
n,m  = map(int,input().split())

balls = [1 for _ in range(n)]
red = [1] + [0 for _ in range(1,n)]

for _ in range(m):
  x, y = map(int,input().split())
  x,y = x-1, y-1
  
  if balls[x] ==0:
    continue
    
  balls[x] -= 1
  balls[y] += 1
  if red[x]:
    red[y] = 1
  if balls[x]==0:
    red[x] = 0
print(sum(red))
# Judge status: Accepted

s, t = [x for x in input().split()]
a, b = [int(x) for x in input().split()]
u = input()

if u == s:
  a = a-1

if u == t:
  b = b-1

print(a, b)
# Judge status: Accepted
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)

res = 0
if N % 2 == 0:
    r = N // 2
    for i in range(r):
        res += A[i] * 2
    print(res - A[0])
else:
    r = N // 2 + 1
    for i in range(r):
        res += A[i] * 2
    print(res - A[0] - A[r - 1])
# Judge status: Accepted
# coding: utf-8
# Your code here!
q,h,s,d = map(int,input().split())
N=int(input())

x=min(q*8,h*4,s*2,d)#2Lあたりの値段 
y=min(q*4,h*2,s)
if N % 2 == 0:
    ans = x * (N//2)
else:
    ans = x * (N // 2)
    ans += y

print(ans)
# Judge status: Accepted
a, b = map(int, input().split())
if a < 0 and b < 0:
    print("Positive") if (b - a + 1) % 2 == 0 else print("Negative")
elif a < 0 and b >= 0:
    print("Zero")
else:
    print("Positive")
# Judge status: Accepted
N, M = map(int, input().split(" "))

if N == M:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
N = int(input())
S = input()
w = [0] * (N+1)
e = [0] * (N+1)
for i in range(N):
    if S[i] == 'W':
        w[i+1] = w[i] + 1
        e[i+1] = e[i]
    if S[i] == 'E':
        e[i+1] = e[i] + 1
        w[i+1] = w[i]
ans = 10 ** 6
for i in range(N):
    ans = min(ans, w[i] + e[N] - e[i + 1])
print(ans)
# Judge status: Accepted
import sys
s = input()
state = False
if s[0] != "A":
    print("WA")
    sys.exit()
cnt = 0
for i in range(2,len(s)-1):
    if s[i] == "C":
        cnt +=1
if cnt != 1:
    print("WA")
    sys.exit()
for i in range(len(s)):
    if s[i] == "A":
        continue
    elif s[i] == "C":
        continue
    elif s[i].islower():
        continue
    else:
        print("WA")
        sys.exit()
print("AC")
# Judge status: Accepted
#import numpy as np

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

ans = 0
for i in range(1, N):
    ans += (N-1) // i
print(ans)
# Judge status: Wrong Answer
n=int(input())
l=[input().split() for i in range(n)]
l=[[int(i) for i in j] for j in l]

l.sort()

left=[]
right=[]
count=1

for i in range(len(l)):
  left.append(l[i][0]-l[i][1])
  right.append(l[i][0]+l[i][1])
  if len(right)>1:
    if left[-1]<right[-2]:
      right=right[:(-1)]
      left=left[:(-1)]
    else:
      count+=1
print(count)
# Judge status: Accepted
n = int(input())
l = [0]*n
k = [0]*n
for i in range(n):
    x,y = map(int,input().split())
    l[i]=x+y
    k[i]=x-y
print(max(abs(max(l)-min(l)), abs(min(l)-max(l)), abs(max(k)-min(k)), abs(min(k)-max(k))))
# Judge status: Accepted
A,B=map(int,input().split())
if A==1:
    A=A+13
if B==1:
    B=B+13

if A>B:
    print('Alice')
elif A<B:
    print('Bob')
else:
    print('Draw')
# Judge status: Accepted
from math import atan, degrees
a, b, x = map(int, input().split())

rad = atan(2*(b/a-x/(a**3))) if x>=(a**2)*b/2 else atan(a*(b**2)/2/x)
print(degrees(rad))
# Judge status: Wrong Answer
N = int(input())

furui = [1]*(N+1)
ans = 0
for i in range(2, N+1):
    k = i
    while k < N:
        furui[k] += 1
        k += i
    ans += furui[i]*i

print(ans)
# Judge status: Wrong Answer
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
def main():
    S = input()
    mx = 0
    cnt = 0
    pre = 'R'
    for i in range(len(S)): 
        if (S[i] == 'R') and (pre == 'R'):
            cnt += 1
        else:
            cnt = 0
            pre = 'S'
        mx = max(cnt, mx)
    print(mx)
if __name__ == '__main__':
    main()
# Judge status: Accepted
A, B, C = map(int, input().split())
if A+B == C or A+C == B or A == B+C:
  print('Yes')
else:
  print('No')
# Judge status: Accepted
s = sorted(input())
t = sorted(input(),reverse = True)

if s < t:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
def main():
    X, Y = (int(i) for i in input().split())
    ans = 0
    while X <= Y:
        ans += 1
        X *= 2
    print(ans)


if __name__ == '__main__':
    main()
# Judge status: Accepted
def main():
  N = int(input())
  A = list(map(int, input().split()))
    
  m = A[0]
  S = 0

  for a in A:
      if m - a > 0:
          S += m - a
      if m < a:
          m = a

  print(S)


if __name__ == "__main__":
  main()
# Judge status: Wrong Answer
N = int(input())
print(N*3.141592)
# Judge status: Accepted
def resolve():
    N, K = list(map(int, input().split()))
    cnt = 1
    while N >= K**cnt:
        cnt += 1
    print(cnt)

if '__main__' == __name__:
    resolve()
# Judge status: Accepted
n, k = map(int, input().split())
h = sorted([int(input()) for x in range(n)])
d = 10**9

for i in range(n-k+1):
    d = min(d, h[i+k-1] - h[i])

    if d == 0:
        break

print(d)
# Judge status: Accepted
S = input()

if len(S) % 2 == 0 and S.count('hi') == len(S)//2:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
a,b,c=map(int,input().split())
A = b*c*(a-(a//2)*2)
B = c*a*(b-(b//2)*2)
C = a*b*(c-(c//2)*2)
print(min(A,B,C))
# Judge status: Wrong Answer
a,b,k=map(int,input().split())
i=0
while(k):
  i+=1
  if max(a%i,b%i):
    pass
  else:
    k-=1
print(i)
# Judge status: Accepted
a,b,c,d=map(int,input().split())
if abs(a-c)<=d or (abs(a-b)<=d and abs(b-c)<=d):
    print('Yes')
else:
    print('No')
# Judge status: Accepted
A,B,C=map(int,input().split())

cnt=0
lp=0
ls=set()
a=A
b=B
c=C
ls.add((a,b,c))
while not(a%2==1 or b%2==1 or c%2==1 or lp==1):
    a=int((A+B+C-a)/2)
    b=int((A+B+C-b)/2)
    c=int((A+B+C-c)/2)
    cnt+=1
    if ((a,b,c) in ls):
        lp=1
if lp==1:
    print(-1)
else:
    print(cnt)
# Judge status: Accepted
sx,sy,tx,ty = map(int, input().split())
dx=tx-sx
dy=ty-sy
s='R'*dx+'U'*dy+'L'*dx+'D'*dy+'L'+'U'*(dy+1)+'R'*(dx+1)+'D'+'R'+'D'*(dy+1)+'L'*(dx+1)+'U'
print(s)
# Judge status: Wrong Answer
# abc096_b.py
A = list(map(int,input().split()))
A.sort(reverse=True)
N = int(input())
ans = 0
for i,v in enumerate(A):
    if i == 0:
        ans += v*2*N
    else:
        ans += v
print(ans)
# Judge status: Accepted
N, x = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
count = 0
for i in range(len(a)):
    if x - a[i] >= 0:
        x -= a[i]
        count += 1
    else:
        break
if count == N and x  > 0:
    print(count - 1)
else:
    print(count)
# Judge status: Accepted
N, K = map(int, input().split())
A = [-1] + list(map(int, input().split()))

if (N - 1) % (K - 1):
    print((N - 1) // (K - 1) + 1)
else:
    print((N - 1) // (K - 1))
# Judge status: Accepted
import collections
s = list(input())
tmp = len(set(s))
c = collections.Counter(s).most_common()
if (c[0][1] >= c[-1][1] + 2 and tmp == 3) or (tmp == 2 and len(s) > 2) or (tmp == 1 and len(s) != 1):
    print('NO')
else:
    print('YES')
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt=0
for i in range(n):
    if a[i]<=b[i]:
        cnt+=a[i]
        b[i]-=a[i]
        if a[i+1]<=b[i]:
            cnt+=a[i+1]
            a[i+1]=0
        else:
            cnt+=b[i]
            a[i+1]-=b[i]
    else:
        cnt+=b[i]
print(cnt)
# Judge status: Wrong Answer
sx, sy, tx, ty = map(int,input().split())

dx = (tx - sx)
dy = (ty - sy)

s = 'U' * dy + 'R' * dx

s += 'D' * dy + 'L' * dx

s += 'L' + 'U' * (dy+1) + 'R' * (dx+2)

s += 'R' + 'D' * (dy+1) + 'L' * (dx+2)

print(s)
# Judge status: Wrong Answer
a,b,c=list(map(int,input().split()))
count=0
while(a<=b):
  a-=b
  if count==c:
    break
  count+=1
print(count)
# Judge status: Accepted
import math
a, b, n = list(map(int, input().split()))
x = min(b-1,n)
ans = math.floor(a*x/b)-a*math.floor(x/b)
print(ans)
# Judge status: Accepted
n,k=map(int,input().split())
l=list(map(int,input().split()))
s=str(n)
flag=False
while flag==False:
    flag=True
    for j in l:
        if s.count(str(j))!=0:
            s=int(s)
            s+=1
            s=str(s)
            flag=False
            break
print(s)
# Judge status: Accepted
n = input()
if n[-1] == '3':
  print("bon")
elif n[-1] in ["0", "1", "6", "8"]:
  print("pon")
else:
  print("hon")
# Judge status: Accepted
# A - Airplane
# https://atcoder.jp/contests/abc129/tasks/abc129_a

ABC = list(map(int, input().split()))
ABC.sort()
print(ABC[0] + ABC[1])
# Judge status: Wrong Answer
h,a = map(int,input().split())
if h%a==0:
    print(h//a)
else:
    print(h//a)
# Judge status: Wrong Answer
import numpy as np
N, M = map(int, input().split())
c = []
for _ in range(M):
    a, b= map(int, input().split())
    c.append(a)
    c.append(b)

C = np.zeros((max(c),1),dtype = 'int')
for i in range(len(C)):
    C[i,0] = c.count(i+1)
print(C)
# Judge status: Accepted
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
s = S()
ans = 'Good'
tmp = ''
for c in s:
    if tmp == c:
        ans = 'Bad'
    tmp = c
print(ans)
# Judge status: Accepted
S = input()
if S == "SUN":
  print(7)
elif S == "MON":
  print(6)
elif S == "TUE":
  print(5)
elif S == "WED":
  print(4)
elif S == "THU":
  print(3)
elif S == "FRI":
  print(2)
else:
  print(1)
# Judge status: Accepted
from operator import itemgetter
n=int(input())
s=[input() for i in range(n)]
m=int(input())
t=[input() for i in range(m)]
d=dict()
for i in range(n):
  if s[i] not in d:
    d[s[i]]=1
  else:
    d[s[i]]+=1
for i in range(m):
  if t[i] in d:
    d[t[i]]-=1
d=sorted(list(d.items()),reverse=True,key=itemgetter(1))
if d[0][1]>0:
  print(d[0][1])
else:
  print(0)
# Judge status: Wrong Answer
s = input()

flag = 0

while(len(s)>0):
  if (s[:6] == 'eraser'):
    s = s[6:]
  elif (s[:5] == 'erase'):
    s = s[5:]
  elif (s[:5] == 'dream'):
    if (s[5:8] == 'ere' or s[5:8] == 'erd'):
      s = s[7:]
    else:
      s = s[5:]
  else:
    flag = 1
    break

if (flag == 0):
  print('Yes')
else:
  print('No')
# Judge status: Accepted
N = int(input())

print((N + 1) // 2)
# Judge status: Wrong Answer
import numpy as np

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

m = int(np.median(x))
k = int(np.std(x))
ans = max(x) ** 2 * n

# pos = m + k
# print(pos)
# cost = 0

for i in range(m-k, m+k, 1):
  cost = 0
  for j in range (n):
    cost += (x[j] - i) ** 2
  # print(cost)
  if cost < ans:
    ans = cost

print(ans)
# Judge status: Accepted
S = input()
even = [v for i, v in enumerate(S) if i % 2 == 0]
odd = [v for i, v in enumerate(S) if i % 2 == 1]
count = even.count("L") + odd.count("R")
print("Yes" if count == 0 else "No")
# Judge status: Wrong Answer
H = int(input())
print(H)
def ref(H,d):
  d = d+1
  if 1 < H:
  	H, d = ref(H/2,d*2)
  return H, d

_, d = ref(H,0)

print(d)
# Judge status: Accepted
n,k=map(int,input().split())
A=list(map(int,input().split()))
C=[n for _ in range(n)]

for loop in range(k):
    B=[0 for _ in range(n)]
    for i in range(n):
        l,r=max(0,i-A[i]),i+A[i]+1
        B[l] +=1
        if r<n:B[r] -=1
    for i in range(n-1):
        B[i+1]=B[i]+B[i+1]
    A=B
    if A==C:break
print(*A)
# Judge status: Accepted
s = input()
count = 0
tmp = s[0]
for i in range(1, len(s)):
    if s[i] == tmp:
        count += 1
        if s[i] == "0":
            tmp = "1"
        else:
            tmp = "0"
    else:
        tmp = s[i]

print(count)
# Judge status: Wrong Answer
data = list(map(int, input().split()))

x = data[2] - data[0]
y = data[3] - data[1]

go = x * "U" + y * "R"
come = x * "D" + y * "L"

path = (go + come) * 2
print(path)
# Judge status: Accepted
import collections
n=int(input())
print(int(sum((i*(i-1)/2)for i in collections.Counter([str(sorted(input()))for i in range(n)]).values())))
# Judge status: Accepted
def main():
    n = int(input())
    print(b(n))


def b(n: int) -> int:
    m = 100
    i = 0
    while True:
        m = m * 101 // 100
        i += 1
        if m >= n:
            break

    return i


if __name__ == '__main__':
    main()
# Judge status: Accepted
k,s = map(int, input().split())

count = 0
for x in range(k+1):
    for y in range(k+1):
        z = s-(x+y)
        if (0 <= z <= k):
            count += 1
                
print(count)
# Judge status: Accepted
a,b=map(int,input().split())
if a%b == 0:
    print(a//b)
else:
    print(a//b+1)
# Judge status: Accepted
n,m,x,y = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
a.sort(reverse = True)
b.sort()
bool = False
if a[0] < b[0]:
    for i in range(a[0] + 1,b[0] + 1):
        if x < i and i <= y:
            bool = True
if bool:
    print('No War')
else:
    print('War')
# Judge status: Accepted
N = int(input())
d = []
visited = [False for _ in range(N+1)]
for _ in range(N):
  d.append(int(input())-1)

i = 0
cnt = 0
while True:
  if i == 1:
    break
  elif cnt >= N:
    cnt = -1
    break
  elif visited[i]:
    cnt = -1
    break
  else:
    visited[i] = True
    cnt += 1
    i = d[i]
  
print(cnt)
# Judge status: Accepted
# AtCoder Grand Contest 004
# A - Divide a Cuboid


l=list(map(int,input().split()))
l.sort()

if l[0]*l[1]*l[2]%2==0:
    print(0)
else:
    print(l[0]*l[1])
# Judge status: Accepted
k=int(input())
n=100
y=0
while(n<k):
    n=int(n*1.01)
    y+=1
    #print(y,n)
print(y)
# Judge status: Wrong Answer
import sys
import math

numbers = sys.stdin.readline().split(' ')

a = int(numbers[0])
b = int(numbers[1])
c = int(numbers[2])


if a > 0:
    print(int(b//c - (a-1)//c))
else:
    print(math.floor(b//c))
# Judge status: Accepted
N = int(input())

from math import floor, sqrt
ans = floor(sqrt(N))**2
print(ans)
# Judge status: Accepted
from functools import reduce

n = int(input())
a = list(map(int,input().split()))
b = [0]*n
a_xor=reduce(lambda x,y : x^y,a)
for i in range(n):
  b[i]=a[i]^a_xor  
##  b[i] = reduce(lambda x,y : x^y,a[0:i+1]+a[i:])

print(" ".join(list(map(str,b))))
# Judge status: Accepted
# input
A = int(input())
B = int(input())

# check
Answer = list(set([1, 2, 3]) ^ set([A, B]))[0]

print(Answer)
# Judge status: Accepted
N, L = map(int, input().split())
S = [input() for _ in range(N)]
S.sort()
print("".join(S))
# Judge status: Accepted
N=int(input())
a=list(map(int, input().split()))
cnt=[0]*N

for i in range(N):
    cnt[a[i]-1]+=1

c_sum=0
for i in range(N):
    c_sum+=(cnt[i]*(cnt[i]-1))//2

for i in range(N):
    k=(cnt[a[i]-1])*(cnt[a[i]-1]-1) //2
    l=(cnt[a[i]-1]-1)*(cnt[a[i]-1]-2) //2
    d=k-l
    print(c_sum-d)
# Judge status: Accepted
import sys

input = sys.stdin.readline
N = int(input())
S = sorted([sorted(input()) for _ in range(N)])
ans = 0
pre = '_'
precnt = 0
for s in S:
    if s == pre:
        precnt += 1
        ans += precnt
    else:
        pre = s
        precnt = 0
print(ans)
# Judge status: Wrong Answer
n, x = map(int, input().split())
li_a = list(map(int, input().split()))
s = []
for i in range(n-1):
    s.append(li_a[i]+li_a[i+1])
ans = 0
for i in range(n-1):
    if s[i] >= x:
        ans += s[i] - x
        if i != n-2:
            s[i+1] -= s[i] - x
print(ans)
# Judge status: Accepted
S = input()
ans = "Yes"
if len(S)%2==1:ans = "No"
for i in range(len(S)//2):
    if S[i*2]+S[i*2+1]!="hi":
        ans = "No"
print(ans)
# Judge status: Wrong Answer
n,m = map(int,input().split())
ans = 0
if 2*n>m:
  ans += m//2
else:
  ans += n
  m -= 2*n
  ans += m//3
  
print(ans)