peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
# Next Prime
import numpy as np

# input
X = int(input())

# solve
prime = 0
numbers = np.array(list(range(2, 10**5 + 4)))

while prime < X:
    prime = numbers[0]
    numbers = numbers[numbers % prime != 0]

# output
print(prime)
# Judge status: Accepted
n=int(input())
S=sorted([int(input()) for i in range(n)])
ans=sum(S)
if ans%10==0:
    for i in range(n):
        if (ans-S[i])%10!=0:
            ans-=S[i]
            break
print(ans if ans%10!=0 else 0)
# Judge status: Wrong Answer
N,K = map(int,input().split())
A = list(map(int,input().split()))
B = A.index(1)
#print(B)
ans = 0
C = B
if K == N:
    print(1)
else:
    while C < N:
        C += K - 1
        ans += 1
    while B > 0:
        B -= K - 1
        ans += 1
    print(ans)
# Judge status: Wrong Answer
x, y = map(int, input().split())
if (x + y) % 3 != 0:
    print(0)
    exit()
a = (x + y) // 3
x -= a
y -= a
mod = 10 ** 9 + 7
def combination(n, r):
    x = 1
    y = 1
    for i in range(r):
        x = x * (n - i) % mod
        y = y * (r - i) % mod
    return (x * pow(y, mod-2, mod)) % mod
print(combination(x+y, min(x, y)))
# Judge status: Wrong Answer
N, K = map(int, input().split())

if abs(N-K) >= N:
    print(N)

elif N % K != 0:
    print(1)

elif N % K == 0:
    print(0)

else:
    print(2)
# Judge status: Accepted
n = int(input())
s = input()
from collections import Counter
c = dict(Counter(s))
ans = 0
for i in c:
    ans *= c[i]+1
    ans += c[i]
print(ans%(10**9+7))
# Judge status: Accepted
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    a, b = input().split()
    c, d = int(a), int(b[0] + b[-2:])

    print(c * d // 100)


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
s=input()

def month(n):
    if n <= 12:
        return True
    else:
        return False

if month(int(s[0:2])):
    if month(int(s[2:4])) and int(s[2:4]) != 0:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if month(int(s[2:4])) and int(s[2:4]) != 0:
            print("YYMM")
    else:
        print("NA")
# Judge status: Wrong Answer
a=int(input())
b=int(input())
h=int(input())

print(((a+b)*h)/2)
# Judge status: Wrong Answer
n=int(input())
list=input().split()
count=0
for i in range(n-2):
  l=[list[i],list[i+1],list[i+2]]
  l.sort()
  if l[1]==list[i+1]:
    count+=1
print(count)
# Judge status: Accepted

def task(n, a):
    total = 0
    tl = [0] * n
    tr = [0] * n

    for i in range(0, n):
        l = i - a[i]
        r = i + a[i]

        if l >= 0:
            tl[l] += 1

        if r < n:
            tr[r] += 1

    for i in range(0, n):
        if tl[i] > 0 and tr[i] > 0:
            total += tl[i] * tr[i]

    print(total)


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

task(n, a)
# Judge status: Wrong Answer
a = 10
b = 10
c = a * b
if c % 2 == 0:
  print ('Even')
else:
  print ('Odd')
# Judge status: Wrong Answer
# B
# 2020/03/27 8:52-
n, m, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))

x = sorted(x)
y = sorted(y)

xr = x[-1]
yl = y[0]

if xr <= yl and X < yl and xr < Y:
    print('No War')
else:
    print('War')
# Judge status: Wrong Answer
#python3
from numpy import ceil
h, a = map(int, input().split())

print(ceil(h/a))
# Judge status: Wrong Answer
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

n = int(input())
a = list(map(int,input().split()))
c = collections.Counter(a)
li2 = [0,0]
li4 = [0]
for key,value in c.items():
    if value>=4:
        li4.append(key)
    elif value>=2:
        li2.append(key)
ans1 = li2[-1]*li2[-2]
ans2 = li4[-1]**2
print(max(ans1,ans2))
# Judge status: Wrong Answer
X=int(input())
ans=0
for i in range(X+1,10**5+100):
    cond=True
    for j in range(2,int(i**0.5)+1):
        if i%j==0:
            cond=False
            break
    if cond:
        ans=i
        break

print(ans)
# Judge status: Accepted
import math

n = int(input())

print(math.factorial(n) % (10**9 + 7))
# Judge status: Accepted
d={"I":+1,"D":-1}
input()
s=input()
maxx=0
x=0
for c in s:
  x+=d[c]
  maxx=max(x,maxx)
print(maxx)
# Judge status: Accepted
N = int(input())
l = list(map(int,input().split()))

new_l = sorted(l)
half1 = new_l[N//2-1]
half2 = new_l[N//2]

print(half2-half1)
# Judge status: Accepted
from math import gcd
K = int(input())
sum = 0
for a in range(1, K+1):
    for b in range(1, K+1):
        p = gcd(a, b)
        for c in range(1, K+1):
            sum += gcd(p, c)
print(sum)
# Judge status: Wrong Answer
n=int(input())
ls=[0]*n
x=1
y=1
z=1
p=6
m=int(n**0.5)
for x in range(1,m):
  for y in range(1,x+1):
    for z in range(1,y+1):
      k=3
      if x==y and x==z:
        k=1
      j=x*x+y*y+z*z+x*y+y*z+x*z
      if j<=n:
        ls[j-1]+=k
      else:
        break
for i in ls:
  print(i)
# Judge status: Accepted
S=str(input())
l=len(S)
ans=0
dig=1
mod=[0]*2019
mod[0]=1
t=0
for i in range(l):
    t=(t+int(S[-i-1])*dig)%2019
    mod[t]+=1
    dig=(dig*10)%2019
    
for j in mod:
    ans=ans+(j*(j-1))//2
print(ans)
# Judge status: Wrong Answer
s = input()

s_u, s_l = int(s[:2]), int(s[2:])
if s_u > 12 and 1 <= s_l <= 12:
    print('YYMM')
elif 1 <= s_u <= 12 and s_l > 12:
    print('MMYY')
elif 1 <= s_u <= 12 and 1 <= s_l <= 12:
    print('AMBIGUOUS')
elif s_u == 0 or s_l == 0:
    print('NA')
# Judge status: Wrong Answer
N = int(input())
A = list(map(int,input().split()))
n = 0
can = True

while can:
    #すべてが偶数か確認
    for i in range(N):
        if A[i] % 2 == 0:
            continue
        else:
            can = False
            break

    if A[i] % 2 == 0:
        A[i] = A[i]/2
    
    n += 1


print(n)
# Judge status: Accepted
A, B, C = map(int, input().split())
print(A+B+C-max(A,B,C))
# Judge status: Wrong Answer
a = [input() for i in range(3)]
S_a = list(a[0])
S_b = list(a[1])
S_c = list(a[2])
card_dict = {'a':S_a, 'b':S_b, 'c':S_c}
first_card = card_dict['a'][0]
card_dict['a'] = S_a[1:]
next_turn = first_card
stop_flag = 0
winner = 'z'
while(stop_flag == 0):
  try:
    temp_card = card_dict[next_turn][0]
  except IndexError:
    stop_flag = 1
    winner = next_turn.upper()
  else:
    next_turn = temp_card
    card_dict[next_turn] = card_dict[next_turn][1:]
print(winner)
# Judge status: Wrong Answer
n = input()
if n.isupper():
  print('A')
else:
  print('B')
# Judge status: Wrong Answer
s = input().split()
t = input().split()
j = 0
for i in range(len(s)):
  if not(s[i] == t[i]):
    j += 1
 
print(j)
# Judge status: Accepted
N = int(input())

print(N*800-200*(N//15))
# Judge status: Accepted
N = int(input())

box = []
for i in range(1, N+1):
    if i%3 ==0 or i%5==0:
        continue
    else:
        box.append(i)

print(sum(box))
# Judge status: Accepted
_,*ss = open(0).read().split()

from collections import Counter
c = Counter(ss)

mx = c.most_common(1)[0][1]

for s in sorted(key for key,count in c.items() if count==mx):
    print(s)
# Judge status: Accepted
import sys
s = input()
print(s[:3])
# Judge status: Accepted
k = input().split()
a = k[0]
b = k[1]
c = k[2]
for i in range(len(k)):
    k[i] = int(k[i])
h = max(k)

Buf = 1
del k[k.index(h)]

for i in k:
    Buf = Buf * int(i)
r = Buf/2
print(int(r))
# Judge status: Accepted
from collections import Counter
N=int(input())
S=input()
mod = 10**9+7
d = Counter(S)
ans = 0
for i in S:
    tmp = 1
    d[i] -=1
    for k,v in d.items():
        if i!=k and v:
            tmp *=(v+1)
            tmp%=mod
    ans += tmp
    ans %=mod
print(ans)
# Judge status: Wrong Answer
a = list(map(float,input().split()))
x = a[0]
y = a[1]

n = a[0]
count = 0

while n <= y:
  n = n * 2
  count += 1
  
print(str(count))
# Judge status: Accepted
S = input()

ans = 1000
for i in range(len(S)-2):
    t = abs(int(S[i:i+3])- 753)
    if t < ans:
        ans = t
print(ans)
# Judge status: Accepted
def main():
    s = input()
    t = input()

    s = sorted(s)
    t = sorted(t)[::-1]

    N = len(s)
    M = len(t)

    if N < M:
        if s == t[:N]:
            print('Yes')
            return
    N = min(N, M)
    i = 0
    while i < N and s[i] == t[i]:
        i += 1
    if i < N and s[i] < t[i]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()
# Judge status: Wrong Answer
S,T = (x for x in input().split())
A,B = map(int,input().split())
U = input()
if U ==S:
  print(A-1,B)
elif U ==S:
  print(A,B-1)
# Judge status: Accepted
mini, maxi, K_ban = map(int, input().split())

if (maxi - mini + 1 <= 2 * K_ban):
    ans = [i for i in range(mini, maxi + 1)]

else:
    left = [i for i in range(mini, mini + K_ban)]
    right = [i for i in range(maxi - K_ban + 1, maxi + 1)]
    
    ans = left + right
    

[print(n) for n in ans]
# Judge status: Wrong Answer
A,B=map(int,input().split())
N=min(A,B)
i=0

for i in range(N+1,1,-1):
  if A%i==0 and B%i==0:
    print(round(A*B/i))
    break
  else:
    print(round(A*B))
    break
# Judge status: Accepted
n = int(input())
s = input()
e = s.count("E")
w = n - e
ans = 10**9
if s[0] == "W":
    cnt = e
else:
    cnt = e-1
num = cnt
#print("Num =",num)
for i in range(n-1):
    if s[i] == s[i+1] and s[i] == "E":
        cnt -= 1
    elif s[i] == s[i+1]:
        cnt += 1
    #print(i,cnt)
    ans = min(ans,cnt,num)
    ans = max(ans,0)
print(max(ans,0))
# Judge status: Wrong Answer
n=int(input())
d={}
for x in range(n):
  s=int(input())
  if s in d:
    if d[s]==0:
      d[s]=1
    else:
      d[s]=0
      
  if s not in d:
    d[s]=1
  
ans=0
for y in d:
  if d[y]==1:
    ans+=1
# Judge status: Wrong Answer
S = sum(list(map(int,input().split())))

if S >= 22:
    print('burst')
elif S <= 21:
    print('win')
# Judge status: Wrong Answer
def slove(ab_list, k):
    num_list = []
    count = 0
    for a, b in ab_list:
        count += b
        if count >= k:
            break

    return a

if __name__ == "__main__":
    n, k = [int(i) for i in input().split()]
    ab_list = [[int(i)for i in input().split()] for i in range(n)]
    print(slove(ab_list, k))
# Judge status: Accepted
if input() in ['a', 'i', 'u', 'e', 'o']:
    print('vowel')
else:
    print('consonant')
# Judge status: Accepted
X = int(input())

for a in range(-200, 200):
    for b in range(-200, 200):
        if a ** 5 - b ** 5 == X:
            print(a, b)
            exit()
# Judge status: Wrong Answer
n = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
res = 0
for i in range(n - 1):
    res += B[i]
    if A[i] + 1 == A[i + 1]:
        res += C[A[i] - 1]
print(res)
# Judge status: Accepted
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
d=abs(b-a)
dv=v-w
if d<=t*dv:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
n = str(input())
flag = False

if n[0] == n[1] == n[2] or n[1] == n[2] == n[3]:
    flag = True

if flag:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
# D - Water Bottle

from math import atan, pi

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

theta = 0
if a * a * b / 2 < x:
    theta = atan((2 * ((a ** 2) * b - 2)) / (a ** 3))
else:
    theta = atan((a * (b ** 2)) / (2 * x))

print(theta * 180 / pi)
# Judge status: Accepted
# row = [int(x) for x in input().rstrip().split(" ")]
# n = int(input().rstrip())
# s = input().rstrip()
# row = [int(input().rstrip()) for _ in range(n)]

def resolve():
    import sys
    input = sys.stdin.readline
    import functools
    import operator

    n = int(input().rstrip())

    ans = 1
    for i in range(1, n+1):
        ans *= i
        ans = ans % 1000000007

    print(ans)



if __name__ == "__main__":
    resolve()
# Judge status: Accepted
import sys
input = sys.stdin.readline

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

ans = [s]*k
add = s + 1 if s + 1 <= 10**9 else s - 1
for i in range(n - len(ans)):
    ans.append(add)
print(*ans)
# Judge status: Accepted
def gcd(a, b):
    if a < b:
        return gcd(b, a)
    while b > 0:
        a, b = b, a % b
    return a

n = int(input())
a = list(map(int, input().split()))
l = a[:]
r = a[:]

for i in range(n-1):
    l[i+1] = gcd(l[i], l[i+1])
    r[-i-2] = gcd(r[-i-1], r[-i-2])

max_val = max(l[-2], r[1])
for i in range(1, n-1):
    max_val = max(max_val, gcd(l[i-1], r[i+1]))
print(max_val)
# Judge status: Accepted
n, k = map(int, input().split())
s = input()
ans = s[:k-1] + chr(ord(s[k-1])+32) + s[k:]
print(ans)
# Judge status: Accepted
N = int(input())
W = list(map(int, input().split()))
res = []

for i in range (1, N):
  S1 = sum(W[:i])
  S2 = sum(W[i:])
  res.append(abs(S1-S2))
  
print(min(res))
# Judge status: Accepted
a,b,k=map(int,input().split())

i=1
cnt=0
result=[]

while i<=min(a,b):
  if a%i==0 and b%i==0:
    cnt+=1
    result.append(i)
  i+=1

print(result[-k])
# Judge status: Wrong Answer
N, M = map(int, input().split())
A = sorted(list(map(int, input().split())))
BC = [list(map(int, input().split())) for _ in range(M)]

m = A[0]
D = [0]
for b, c in BC:
    if c > m:
        _ = [D.append(c) for i in range(b)]
    else:
        continue


for i, d in enumerate(D[::-1]):
    if i == N:
        break
    if A[i] < d:
        A[i] = d
    else:
        break

print(sum(A))
# Judge status: Wrong Answer
n,a = map(int,input().split())
print(int(a*(n-1)+n/2*(n-1)-1-n))
# Judge status: Wrong Answer
n = int(input())

while n >= 1000:
    n -= 1000
    n = max(n, 0)

# print((1000 - n % 1000) % 1000)

print(n)
# Judge status: Accepted
#!/usr/bin/env python3
a, b, t = map(int, input().split())
tmp = a
ans = 0
while (True):
    for i in range(100):
        if a >= t + 0.5:
            print(ans)
            exit()
        a += tmp
        ans += b
# Judge status: Wrong Answer
A, B= map(int, input().split())

if A==1:
    A = 14

if B==1:
    B=14

if A > B:
    print("Alice")
elif B < A:
    print("Bob")
else :
    print("Draw")
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(len(a)):
  b.append([a[i], i, 0])
b.sort()
for i in range(len(b)):
  if i < len(b)/2:
    b[i][2] = b[len(b)//2][0]
  else:
    b[i][2] = b[len(b)//2-1][0]
b.sort(key=lambda x: x[1])
for i in range(len(b)):
  print(b[i][2])
# Judge status: Accepted
#!/usr/bin/env python3

import sys
input=sys.stdin.readline

n=int(input())
arr=list(map(int,input().split()))
cnt=0
for i in range(n):
    if i%2==0 and arr[i]%2==1:
        cnt+=1
print(cnt)
# Judge status: Wrong Answer
string = input()
string=list(string)

count = len(string)
summary = 0

for i in range(count):
    if string[i]=="?":
        string[i]="D"
print(string)

for i in range(count):
    if string[i]== "D" and string[i-1]=="P":
        summary +=1
    if string[i] == "D":
        summary +=1
print(summary)
# Judge status: Wrong Answer
from sys import stdin

n,a,b,c,d = [int(x) for x in stdin.readline().rstrip().split()]
s = ["#"]+list(stdin.readline().rstrip())
for i in range(b,d-1):
    if s[i] == "#" and s[i+1] == "#":
        print("No")
        exit()
s[d] = "#"
for j in range(a,c-1):
    if s[j] == "#" and s[i+1] == "#":
        print("No")
        exit()
print("Yes")
# Judge status: Accepted
A, B, C = map(int, input().split())
K = int(input())

b = 0
while (b <= K and A >= 2**b * B):
    b += 1

if 2**b * B < 2**(K-b) * C:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
c=input()
a=["a","i","u","e","o"]
if c in a:
  print("vowel")
else:
  print("consonant")
# Judge status: Accepted
n =int(input())
a = list(map(int,input().split()))
a.sort()
x,y,i = 0,0,0
while i<n:
  if a[i-1] == a[i]:
    x,y = y,a[i]
    i += 1
  i += 1
print(x*y)
# Judge status: Wrong Answer
# -*- coding: utf-8 -*-
N = int(input())
S = input()

import collections
n_frq_dict = collections.defaultdict(int)
for s in S:
    n_frq_dict[s] += 1

ret = 1
for frq in n_frq_dict.values():
    ret *= frq + 1

print(ret - 1)
# Judge status: Accepted
def main():
    N, M = map(int, input().split())
    bridge_count = [0] * N
    for _ in range(M):
        a, b = map(int, input().split())
        a -= 1; b -= 1
        bridge_count[a] += 1
        bridge_count[b] += 1
    for i in range(N):
        print(bridge_count[i])

if __name__ == "__main__":
    main()
# Judge status: Wrong Answer
a, v = list(map(int, input().split()))
b, w = list(map(int, input().split()))
t = int(input())

if v <= w:
  print('NO')
  exit()

if abs(a - b) / (w - v) <= t:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
n = int(input())
blist=list(map(int,input().split()))
alist=[]

alist.append(blist[0])
for i in range(1,n-1):
    alist.append(min(blist[i-1],blist[i]))
alist.append(blist[n-2])
print(sum(alist))
# Judge status: Accepted
N=int(input())
for i in range(1,10):
  if 111*i>=N:
    print(111*i)
    break
# Judge status: Wrong Answer
N,K=map(int,input().split())
C=[]
c=1
while c<K:
  c*=2
  C.append(c)
C.reverse()

ans=0
h=min(N,len(C))
for i in range(h):
  ans+=1/(C[i])

d=N-len(C)
if d>0:
  ans+=d
print(ans/N)
# Judge status: Accepted
import math
a, b, x = map(int, input().split())
men = x / a
if a * b / 2 <= men:
    h = (((a * b) - men) * 2) / a
    theta = math.degrees(math.atan(h/a))
    print(theta)
    exit()
a_dash = men * 2 / b
theta = math.degrees(math.atan(a_dash / b))
print(90 - theta)
# Judge status: Accepted
str = input()
if str == "RRR":
    print("3")
elif str == "RRS" or str == "SRR":
    print("2")
elif str == "SSS":
    print("0")
else:
    print("1")
# Judge status: Wrong Answer

nums = input().split()


s = int(nums[0])/int(nums[1])
v = int(nums[0])/int(nums[1])

if v != 0:
    s = int(s)+1

time = s*int(nums[2])
print(time)
# Judge status: Accepted
S = input()
n = len(S)
NG = 0
for i in range(n):
  tmp = S[i]
  if (tmp == "U" or tmp == "D"):
    pass
  else:
    if(i % 2 == 0):
      if(tmp == "R"):
        pass
      else:
        NG += 1
    else:
      if(tmp == "L"):
        pass
      else:
        NG += 1
if (NG == 0):
  print("Yes")
else:
  print("No")
# Judge status: Accepted
[print("ABC") if input() == "ARC" else print("ARC")]
# Judge status: Accepted
# ABC 151C
n, m = map(int, input().split())
ac = 0
wa = 0
cnt = [0]*n
for i in range(m):
    p, s = input().split()
    p = int(p)
    p -= 1
    if cnt[p] == -1:
        continue
    elif s == 'AC':
        ac += 1
        wa += cnt[p]
        cnt[p] = -1
    else:
        cnt[p] += 1
print(ac, wa)
# Judge status: Accepted
n = int(input())
a = list(map(int, input().split()))
 
xs = [0] * (max(a) + 1)
 
for v in a:
    if xs[v] == 0:
        for j in range(v, len(xs), v):
            xs[j] += 1
    else:
        xs[v] += 1
print(len(list(filter(lambda v: xs[v] == 1, a))))
# Judge status: Accepted
n=int(input())
p=[int(i) for i in input().split()]
cnt=0
for i in range(1,n-1):
  if p[i-1]<p[i] and p[i]<p[i+1]:
    cnt+=1
  elif p[i-1]>p[i] and p[i]>p[i+1]:
    cnt+=1
print(cnt)
# Judge status: Accepted
w,a,b=map(int,input().split())
if a+w<b:
    print(max(b-a-w,0))
else:
    print(max(0,a-b-w))
# Judge status: Wrong Answer
s=list(input())
l,r=0,len(s)
for i in range(len(s)):
    if i=='A':l=i;break
for i in range(len(s)):
    if len(s)-(i+1)=='Z':r=i;break
print(abs(l-r))
# Judge status: Wrong Answer
a = int(input())
count = 0
for i in range(a):
  if len(str(i)) % 2 == 1:
    count += 1
print(count - 1)
# Judge status: Wrong Answer
N, A, B = map(int, input().split())
mn = A * (N - 1) + B
mx = B * (N - 1) + A
print(mx - mn + 1)
# Judge status: Wrong Answer
a, b = map(int, input().split())
if a < b:
    print(a)
else:
    print(a - 1)
# Judge status: Wrong Answer
N, M, X, Y = list(map(int, input().split()))
x = list(map(int, input().split())) + [X, ]
y = list(map(int, input().split()))
if max(x) < min(y):
    print('No War')
else:
    print('War')
# Judge status: Wrong Answer
x,y,a,b,c=map(int,input().split())
lia=list(map(int,input().split()))
lib=list(map(int,input().split()))
lic=list(map(int,input().split()))
lia.sort(reverse=True)
lib.sort(reverse=True)
lic.sort(reverse=True)
ans=lia[:x]+lib[:y]
ans.sort(reverse=True)
cnt=0
now=0
while cnt < x+y and now < c:
  if lic[now] > ans[cnt]:
    ans[cnt]=lic[now]
    now+=1
  cnt+=1
print(sum(ans))
# Judge status: Wrong Answer
a,b,c=map(int,input().split())
x = a%b if a>b else a
f = False
for i in range(1,b):
  if x*i == c:
    f = True
print("Yes" if f is True else "No")
# Judge status: Wrong Answer
if input().isupper:
  print("A")
else:
  print("a")
# Judge status: Accepted
N=int(input())
k=N//11
s=N-(k*11)
if s==0:
  print(k*2)
elif s<=6:
  print(2*k+1)
else:
  print(2*k+2)
# Judge status: Accepted
S = list(input())
T = list(input())
N = len(S)

a = ord('a')
alf = []
for i in range(26):
     alf.append(chr(a))
     a += 1

SN = [[] for i in range(26)]
TN = [[] for i in range(26)]
for i in range(N):
    for j in range(26):
        if alf[j] == S[i]:
            SN[j].append(i)
        if alf[j] == T[i]:
            TN[j].append(i)
SN.sort()
TN.sort()
print('Yes' if SN == TN else 'No')
# Judge status: Wrong Answer
import sys
x,y = map(int,input().split())

if x <= 0 or x >= 13 or y <= 0 or y >= 13:
    sys.exit()
if x >= y:
    sys.exit()

A = (1, 3, 5, 7, 10, 12)
B = (4, 6, 9, 11)

if x == 2 or y == 2:
    print("No")
    sys.exit()
if x in A and y in A:
    print("Yes")
    sys.exit()
if x in B and y in B:
    print("Yes")
    sys.exit()
# Judge status: Wrong Answer
n = int(input())
x = list(map(int,input().split()))
y = sorted(x)
a = y[n//2]
b = y[(n//2)-1]
for i in range(n):
    if x[i]==a:
        print(b)
    else:
        print(a)
# Judge status: Wrong Answer
n, w = map(int, input().split())
wv = [tuple(map(int, input().split())) for _ in range(n)]
 
dp = [0] * (w+1)
for wi, vi in wv:
    for sum_w in reversed(range(w)):
        dp[sum_w] = max(dp[sum_w], dp[sum_w - wi] + vi)
print(dp[w])
# Judge status: Wrong Answer
import sys
N = int(input())
p = 'DENIED'

for i in map(int, input().split()):
  print(i)
  if i % 2 == 0:
    if i % 3 != 0 and i % 5 != 0:
      print('DENIED')
      sys.exit()
    elif i % 3 == 0 or i % 5 == 0:
      p = 'APPROVED'
print(p)
# Judge status: Accepted
S = input()
K = int(input())

ans = ""
for s in S:
    if s == "a":
        ans += s
    elif 123-ord(s) <= K:
        ans += "a"
        K -= 123-ord(s)
    else:
        ans += s
if K > 0:
    ans = ans[:-1] + chr((ord(ans[-1])-97+K)%26+97)
print(ans)
# Judge status: Accepted
from math import atan,pi
a,b,x=map(int,input().split())
if a*a*b/2<=x:
    h=x/(a**2)
    c=(b-h)*2
    theta=atan(c/a)/2/pi*360
    print(theta)
else:
    c=2*x/b/a
    theta=atan(b/c)/2/pi*360
    print(theta)
# Judge status: Wrong Answer
N, M = (int(x) for x in input().split())
A = [-1]*(N+1)
for i in range(M):
  a = int(input())
  A[a] = 0
A[N] = 1
A[N-1] = 1
for i in reversed(range(N-1)):
#  print("i",i)
  if A[i] == -1:
  	A[i] = A[i+1] + A[i+2]
#  print("A[i]",A[i])
print(A[0]%(1000000007))
# Judge status: Wrong Answer
N,A,B = map(int, input().split())
if (B-A)%2==0:
    print((B-A)//2)
else:
    print(max(B-1, N-A))
# Judge status: Wrong Answer
N, M = map(int, input().split())
if N == 1:
    print(M)
    exit()
ans = 1
for i in range(2, N + 1):
    work1 = i * (N - 1)
    work2 = M - work1
    if work2 >= 0 and work2 % i == 0:
        ans = i
print(ans)
# Judge status: Wrong Answer
from collections import Counter
N = int(input())
A = list(map(int,input().split()))

def ch_2(n):
	return n*(n-1)//2

count=Counter(A)
ans=0
for i in range(len(count)):
	ans+=ch_2(count[A[i]])
print(ans)
for j in range(N):
	ttl=ans
	ttl-=ch_2(count[A[j]])
	ttl+=ch_2(count[A[j]]-1)
	print(int(ttl))
# Judge status: Accepted
#problem-c
n = int(input())
p = list(map(int, input().split()))
cnt = 0
min_p = p[0]
for i in range(n):
    if p[i]<=min_p:
        cnt += 1
        min_p = p[i]
print(cnt)
# Judge status: Wrong Answer
import itertools
import copy
from collections import deque
import heapq
n = int(input())
a = list(map(int,input().split()))
flag = True
check = min(a)
ans = 0
for i in a:
    if flag and i == check:
        flag = False
    else:
        ans += i
print(ans)
# Judge status: Wrong Answer
A, B, C = list(map(int,input().split()))

K = int(input())

for i in range(K):
  if A < B < C:
    print("Yes")
    exit()
  elif C < B or C < A:
    C *= 2
    continue
  elif B < A:
    B *= 2
    continue

if A < B < C:
	print("Yes")
	exit()
else:
  print("No")