Harryxun/stf_run huggingface dataset:
a, b, c = map(int, input().split())
print("Yes" ((c-a-b) > 0 and 4*a*b < (c-a-b)**2) if else "No")


### FIXED CODE ###

from decimal import Decimal
a, b, c = map(int, input().split())

a = Decimal(a).sqrt()
b = Decimal(b).sqrt()
c = Decimal(c).sqrt()

if a + b < c:
  print("Yes")
else:
  print("No")
k,s = map(int,input().split())
ans = 0
for i in range(k + 1):
    if i > s;break
    for j in range(k + 1):
        if i + j > s;break
        for k in range(k + 1):
            if i + j + k > s;break
            if i + j + k == s:ans+=1
print (ans)


### FIXED CODE ###

k,s = map(int,input().split())
ans = 0
for i in range(k + 1):
    for j in range(k + 1):
        x = s - (i + j)
        if x <= k and x >= 0 : ans+=1
print (ans)
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
h,w,k = readInts()
s = [list(input()) for _ in range(h)]
#cnt = 1
ans = [[0] * w for _ in range(h)]
for y in range(h):
    la = False
    for x in range(w):
        if s[y][x] == '#':
            if not la:
                la = True
            else:
                cnt += 1
        ans[y][x] = cnt
        print(cnt)
    cnt += 1
for i in range(h):
    print(*ans[i])


### FIXED CODE ###

#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
#from fractions import gcd
#from itertools import combinations # (string,3) 3回
#from collections import deque
#from collections import defaultdict
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
H,W,K = readInts()
cake = [input() for _ in range(H)]
ans = []
no = 0
cnt = 0
for h in range(H):
    if cake[h] == "."*W:
        no += 1
        continue
    else:
        cnt += 1
        same = []
        arrived = False
        for w in range(W):
            if cake[h][w] == "#":
                if not arrived:
                    arrived = True
                else:
                    cnt += 1
            same.append(cnt)
        for _ in range(no+1):
            ans.append(same)
        no = 0
for _ in range(no):
    ans.append(ans[-1])
for a in ans:
    print(*a,sep=" ")
import bisect
n=int(input())
a=[int(i) for i in input().split()]
a.sort()
ans=[]
x=bisect.bisect_left(a, 0)
m=a[:x]
p=a[x:]
if m==[]:
    m+=[p[0]-p[-1]]
    ans+=[[p[0],p[-1]]]
    del p[0]
    del p[-1]

if p==[]:
    p+=[m[-1]-m[0]]
    ans+=[[m[-1],m[0]]]
    del m[-1]
    del m[0]


while len(p)!=1:

    m+=[m[0]-p[0]]
    ans+=[[m[0],p[0]]]
    del p[0]
    del m[0]
cnt=p[0]
for i in m:
    ans+=[[cnt,i]]
    cnt-=i
print(cnt)
for i,j in ans:print(i,j)


### FIXED CODE ###

import bisect
n=int(input())
a=[int(i) for i in input().split()]
a.sort()
ans=[]
x=bisect.bisect_left(a, 0)
m=a[:x]
p=a[x:]

if n==2 and len(p)==2:
    print(p[1]-p[0])
    print(p[1],p[0])
    
    exit()
if m==[]:
    m+=[p[0]-p[-1]]
    ans+=[[p[0],p[-1]]]
    del p[0]
    del p[-1]

if p==[]:
    p+=[m[-1]-m[0]]
    ans+=[[m[-1],m[0]]]
    del m[-1]
    del m[0]

while len(p)!=1:

    m+=[m[0]-p[0]]
    ans+=[[m[0],p[0]]]
    del p[0]
    del m[0]
cnt=p[0]
for i in m:
    ans+=[[cnt,i]]
    cnt-=i
print(cnt)
for i,j in ans:print(i,j)
A, B = map(int, input())

print(max(0, A - 2 * B))

### FIXED CODE ###

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

print(max(0, A - 2 * B))
n = int(input())
s,t = input().split()
 
for i in range(n):
    u = u + s[i] + t[i]
 
print(u)

### FIXED CODE ###

n = int(input())
s,t = map(str,input().split())
u = ""
for i in range(n):
    u = u + s[i] + t[i]

print(u)
N = int(input())

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

Q, K = map(int, input().split())
query = [tuple(map(int, input().split())) for i in range(Q)]

# dist[-i]:頂点Kから頂点iまでの距離
dist = [0 for i in range(N)]

def dfs(v, prv, ds):
    dist[-v] = ds
    for nxt, c in adj[-v]:
        if nxt != prv:
            dfs(nxt, v, ds + c)

dfs(K, None, 0)

for x, y in query:
    print(dist[-x] + dist[-y])


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

N = int(input())

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

Q, K = map(int, input().split())
query = [tuple(map(int, input().split())) for i in range(Q)]

# dist[-i]:頂点Kから頂点iまでの距離
dist = [0 for i in range(N)]

def dfs(v, prv, ds):
    dist[-v] = ds
    for nxt, c in adj[-v]:
        if nxt != prv:
            dfs(nxt, v, ds + c)

dfs(K, None, 0)

for x, y in query:
    print(dist[-x] + dist[-y])
import numpy as np
Nn, Kk, Qq = input().split()
N, K, Q = int(Nn), int(Kk), int(Qq)
a = []
for q in range(Q):
    a.append(int(input()))
r = (np.ones(N) * K).astype(int)
for i in a:
    b = np.ones(N)
    b[i-1] = 0
    r = r - b
print("\n".join(["Yes" if rr > 0 else "No" for rr in r]))

### FIXED CODE ###

import numpy as np
Nn, Kk, Qq = input().split()
N, K, Q = int(Nn), int(Kk), int(Qq)
a = []
for q in range(Q):
    a.append(int(input()))
result = np.ones(N) * (K - Q)
for i in a:
    result[i-1] += 1
result = result > 0
for r in result:
    if r:
        print("Yes")
    else:
        print("No")
def cal(A, B):
    if A >= 13:
        return B
    elif 6 <= A and A <= 12:
        return B/2
    elif 5 <= A:
        return 0

if __name__ == "__main__":
    A = input()
    B = input()
    print(cal(A, B))

### FIXED CODE ###

def main():
    i = list(map(int, input().split()))
    a = i[0]
    b = i[1]

    #if isinstance(a, int) == False or isinstance(b, int) == False or a < 0 or 100 < a or b < 2 or 1000 < b or b % 2 != 0:
    #    return

    if 13 <= a and a <= 100:
        print(b)
    elif 6 <= a and a <= 12:
        print(b//2)
    elif 0 <= a and a <= 5:
        print(0)

if __name__ == "__main__":
    main()
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    n = I()
    d = collections.defaultdict(set)
    for _ in range(n-1):
        a,b = LI()
        d[a].add(b)
        d[b].add(a)

    if n > 10**4*9:
        raise 't'

    f = collections.defaultdict(bool)
    rf = False
    def g(s, h, m):
        t = list(d[s] - set([m]))[-1]
        if len(d[t]) > 2:
            if h:
                if f[t]:
                    return True
                f[t] = True
            else:
                d[t].remove(s)
                d[s].remove(t)
                rf = True
            return False
        if len(d[t]) == 1:
            return not h
        return g(t,not h,s)

    tt = True
    gf = collections.defaultdict(bool)
    while tt:
        if rf:
            gf = collections.defaultdict(bool)
            f = collections.defaultdict(bool)
            rf = False
        tt = False
        for k,v in list(d.items()):
            if len(v) == 1:
                if gf[k]:
                    continue
                gf[k] = True
                res = g(k, True, -1)
                if res:
                    return 'First'
                tt = True
    return 'Second'


print(main())


### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    n = I()
    d = collections.defaultdict(set)
    kk = None
    for _ in range(n-1):
        a,b = LI()
        kk = [a,b]
        d[a].add(b)
        d[b].add(a)

    tt = True
    gf = collections.defaultdict(bool)
    while tt:
        tt = False
        for k,v in list(d.items()):
            if len(v) == 1:
                vt = list(v)[0]
                if len(d[vt]) == 1:
                    continue
                for vv in d[vt]:
                    if vv == k:
                        continue
                    if vt in d[vv]:
                        d[vv].remove(vt)
                d[vt] = set([k])
                tt = True
            elif len(v) == 0:
                return 'First'
    return 'Second'


print(main())
x, y, z, k = map(int, input().split())

xlist = sorted(list(map(int,input().split())), reverse=True)[:min(x, k)]
ylist = sorted(list(map(int,input().split())), reverse=True)[:min(y, k)]
zlist = sorted(list(map(int,input().split())), reverse=True)[:min(z, k)]


anslist = [0]
for i in range(min(x, k)):
    for j in range(min(y, k)):
        for l in range(min(z, k)):
            if (i+1)*(j+1)*(l+1) <= k:
                anslist.append(xlist[i] + ylist[j] + zlist[l])
            else:
                break

anslist = sorted(anslist, reverse=True)
for i in range(k):
    print(anslist[i])


### FIXED CODE ###

import sys

d = [int(i) for i in sys.stdin.read().split('\n') if i != '']
k = d[5]
d = d[:5][::-1]


def check(k, d):
    for i in range(len(d[:4])):
        for j in range(i, len(d)):
            if d[i] - d[j] > k:
                return False
    return True


if check(k, d):
    print('Yay!')
else:
    print(':(')
import sys
import itertools
from functools import lru_cache
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, (input().split(' '))))

    @lru_cache(None)
    def comb1(n, r):
        if n == 0 or r == 0: return 1
        return comb1(n, r - 1) * (n - r + 1) / r

    def comb2(n, r):
        if n < 0 or r < 0 or n < r:
            return 0
        elif n == 0 or r == 0:
            return 1
        return comb2(n - 1, r - 1) + comb2(n - 1, r)

    max = 0
    comb_val1 = 0
    comb_val2 = 0
    for ele in itertools.combinations(A, 2):
        buf_val1 = ele[0]
        buf_val2 = ele[1]
        if ele[1] > ele[0]:
            buf_val1 = ele[1]
            buf_val2 = ele[0]
#        print(buf_val1, buf_val2)
        val = comb1(buf_val1, buf_val2)
        if val >= max:
            max = val
            comb_val1 = buf_val1
            comb_val2 = buf_val2
#    print(max)
    print(str(comb_val1) + ' ' + str(comb_val2))

### FIXED CODE ###

import sys
import itertools
from functools import lru_cache
if __name__ == "__main__":
    N = int(input())
    A = list(map(int, (input().split(' '))))

#    @lru_cache(None)
#    def comb1(n, r):
#        if n == 0 or r == 0: return 1
#        return comb1(n, r - 1) * (n - r + 1) / r
#
##    def comb2(n, r):
##        if n < 0 or r < 0 or n < r:
##            return 0
##        elif n == 0 or r == 0:
##            return 1
##        return comb2(n - 1, r - 1) + comb2(n - 1, r)
#
#    max = 0
#    comb_val1 = 0
#    comb_val2 = 0
#    for ele in itertools.combinations(A, 2):
#        buf_val1 = ele[0]
#        buf_val2 = ele[1]
#        if ele[1] > ele[0]:
#            buf_val1 = ele[1]
#            buf_val2 = ele[0]
##        print(buf_val1, buf_val2)
#        val = comb1(buf_val1, buf_val2)
#        if val >= max:
#            max = val
#            comb_val1 = buf_val1
#            comb_val2 = buf_val2
#    print(max)
#    print(str(comb_val1) + ' ' + str(comb_val2))

### n=10^5 * a=0~10^9の組み合わせがありうるので計算量は結局多いのでメモ化しても意味はない。

    N = max(A)
    A.remove(N)
    min_distance = 10 ** 10
    M = 0
    for a in A:
        if abs(N/2 - a) < min_distance:
            min_distance = abs(N/2 - a)
            M = a
    print("{} {}".format(N, M))
import math
input1 = list(map(int, (input().split())))

a = input1[0]
b = input1[1]

a1 = math.ceil(a / 0.08)
a2 = math.ceil((a+1) / 0.08)
b1 = math.ceil(b / 0.1)
b2 = math.ceil((b+1) / 0.1)
alist = list(range(a1, a2))
blist = list(range(b1, b2))

# print(alist)
# print(blist)
for i in alist:
    for j in blist:
        if i == j:
            print(i)
            # print(i * 0.08)
            # print(i * 0.1)
            exit(1)
print(-1)


### FIXED CODE ###

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

a = input1[0]
b = input1[1]

a1 = math.ceil(a / 0.08)
a2 = math.ceil((a+1) / 0.08)
b1 = math.ceil(b / 0.1)
b2 = math.ceil((b+1) / 0.1)
# alist = list(range(a1, a2))
# blist = list(range(b1, b2))

# print(alist)
# print(blist)
for i in range(a1, a2):
    for j in range(b1, b2):
        if i == j:
            print(i)
            # print(i * 0.08)
            # print(i * 0.1)
            exit(0)
print(-1)
a = input()
b = input()
c = a*b
if c%2==;
	print("even")
else;
	print("odd")

### FIXED CODE ###

a,b = map(int,input().split())
c = a*b
if c %2 == 0:
    print("Even")
else:
    print("Odd")
import numpy as np

N = input()
X = list(map(int, input()))
ans=0
for P in range(max(X)):
  sum = np.sum(map(lambda:x (x-P)**2, X))
    
  if sum >= ans:
    ans = sum
    
print(ans)

### FIXED CODE ###

import numpy as np
 
N = input()
X = list(map(int, input().split()))
ans=9999999
for P in range(0, 101):
  sum = np.sum(list(map(lambda x: (x-P)**2, X)))
  ans = min(ans, sum)
    
print(ans)
ans = "NO"
s = input()


def dfs(s):
    ret = 0
    if len(s) == 0:
        return 1

    if s[:5] == 'dream' or s[:5] == 'erase':
        ret += dfs(s[5:])
    if s[:7] == 'dreamer':
        ret += dfs(s[7:])
    if s[:6] == 'eraser':
        ret += dfs(s[6:])
    return ret


if dfs(s):
    ans = "YES"
print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

s = input()
l = len(s)


def dfs(i):
   #    print("->", s[i:])
    if i == l:
        print("YES")
        exit()
    if s[i:i+5] == "dream":
        if i+6 < l and s[i+5:i+7] == "er":
            dfs(i+7)
        dfs(i+5)
    elif s[i:i+5] == "erase":
        if i+5 < l and s[i+5] == "r":
            dfs(i+6)
        dfs(i+5)


dfs(0)
print("NO")
print((int(input())%int(input())+99)//100)

### FIXED CODE ###

n,k=map(int,input().split())
print(1 if n%k else 0)
while 1:
    s1 = input().split('"')
    if s1 is '.':
        break
    s2 = input().split('"')
    if len(s1) != len(s2):
        print("DIFFERENT")
        continue
    r = [0]*2
    for i in range(len(s1)):
        if s1[i] != s2[i]:
            r[i%2] += 1
    if [0,1]<r:
        print("DIFFERENT")
    else:
        print(["IDENTICAL","CLOSE"][r[1]])

### FIXED CODE ###

while 1:
    s1 = input().split('"')
    if s1 == ['.']:
        break
    s2 = input().split('"')
    if len(s1) != len(s2):
        print("DIFFERENT")
        continue
    r = [0]*2
    for i in range(len(s1)):
        if s1[i] != s2[i]:
            r[i%2] += 1
    if [0,1]<r:
        print("DIFFERENT")
    else:
        print(["IDENTICAL","CLOSE"][r[1]])
print(x**3)

### FIXED CODE ###

x=input()
print(x**3
)
import copy
h,w=map(int,input().split())
a=[list(map(int,input().split())) for i in range(h)]
b=[list(map(int,input().split())) for i in range(h)]
c=[[0]*w for i in range(h)]
for i in range(h):
  for j in range(w):
    c[i][j]=abs(a[i][j]-b[i][j])
dp=[[[] for i in range(w)] for j in range(h)]
dp[0][0].append(c[0][0])
for i in range(h):
  for j in range(w):
    f=0
    if i<h-1:
      l=[]
      for k in range(len(dp[i][j])):
        if -80<=dp[i][j][k]+c[i+1][j]<=80:
          l.append(dp[i][j][k]+c[i+1][j])
        if -80<=l[k]-c[i+1][j]<=80:
          l.append(dp[i][j][k]-c[i+1][j])
      l=list(set(l))
      dp[i+1][j]=l+dp[i+1][j]
      dp[i+1][j]=list(set(dp[i+1][j]))
    f=0
    if j<w-1:
      l=[]
      for k in range(len(dp[i][j])):
        if -80<=dp[i][j][k]+c[i][j+1]<=80:
          l.append(dp[i][j][k]+c[i][j+1])
        if -80<=dp[i][j][k]-c[i][j+1]<=80:
          l.append(dp[i][j][k]-c[i][j+1])
      l=list(set(l))
      dp[i][j+1]=l+dp[i][j+1]
      dp[i][j+1]=list(set(dp[i][j+1]))
for i in range(len(dp[h-1][w-1])):
  dp[h-1][w-1][i]=abs(dp[h-1][w-1][i])
print(min(dp[h-1][w-1]))

### FIXED CODE ###

import sys
input=sys.stdin.readline

def main():
  h,w=map(int,input().split())
  a=[list(map(int,input().split())) for i in range(h)]
  b=[list(map(int,input().split())) for i in range(h)]
  dp=[[[0]*(80*(h+w+1)+1) for i in range(w)] for j in range(h)]
  dp[0][0][abs(a[0][0]-b[0][0])]=1
  for i in range(h):
    for j in range(w):
      c=abs(a[i][j]-b[i][j])
      if i!=0 or j!=0:
        for k in range(80*(i+j+1)+1):
          dp[i][j][k]=dp[i-1][j][abs(k-c)]|dp[i-1][j][k+c]|dp[i][j-1][abs(k-c)]|dp[i][j-1][k+c]
  for i in range(80*(h+w+1)+1):
    if dp[h-1][w-1][i]==1:
      print(i)
      break

if __name__=='__main__':
  main()
a,b,k=map(int,input().split())
for i in range(b-a+1):
    s.append(a+i)
    if i<k or i>b-a+1-k:print(a+i)

### FIXED CODE ###

a,b,k=map(int,input().split())
r=range(a,b+1)
for i in sorted(set(r[:k])|set(r[-k:])):print(i)
X, Y ,A, B, C = map(int,input().split())
listp = list(map(int, input().split()))
listq = list(map(int, input().split()))
listr = list(map(int, input().split()))
listp = sorted(listp, reverse=True)
listq = sorted(listq, reverse=True)
listr = sorted(listr, reverse=True)
listp = listp[:X]
listq = listq[:Y]

eat_noapple = []
oisisa = 0

for noapple in listr:
    if listp[-1] >= listq[-1] and listq[-1] < noapple:
        listq.pop(-1)
        eat_noapple.append(noapple)
    elif listp[-1] < listq[-1] and listp[-1] < noapple:
        listp.pop(-1)
        eat_noapple.append(noapple)
    else:
        break

for papple in listq:
    oisisa += papple
for qapple in listp:
    oisisa += qapple
for rapple in eat_noapple:
    oisisa += rapple

print(oisisa)

### FIXED CODE ###

X, Y, A, B, C = map(int,input().split())
listp = list(map(int, input().split()))
listq = list(map(int, input().split()))
listr = list(map(int, input().split()))

listp = sorted(listp, reverse=True)
listq = sorted(listq, reverse=True)
listr = sorted(listr, reverse=True)
listp = listp[:X]
listq = listq[:Y]
listr = listr[:X+Y]
listp.insert(0, 1000000000000)
listq.insert(0, 1000000000000)


eat_noapple = []
oisisa = 0

for noapple in listr:
    if listp[-1] >= listq[-1] and listq[-1] < noapple:
        listq.pop(-1)
        eat_noapple.append(noapple)
    elif listp[-1] < listq[-1] and listp[-1] < noapple:
        listp.pop(-1)
        eat_noapple.append(noapple)
    else:
        break
listp.pop(0)
listq.pop(0)

try:
    for papple in listq:
        oisisa += papple
except:
    a = 0
try:
    for qapple in listp:
        oisisa += qapple
except:
    a = 0
try:
    for rapple in eat_noapple:
        oisisa += rapple
except:
    a = 0
print(oisisa)
s = list(input())

if s[::2] in "L" or s[1::2] in "R":
    print("No")
else:
    print("Yes")

### FIXED CODE ###

s = input()

if "L" in s[::2] or "R" in s[1::2]:
    print("No")
else:
    print("Yes")
h_all, w_all = map(int, input().split)
h_b, w_b = map(int, input().split)

print((h_all - h_b) * (w_all - w_b))

### FIXED CODE ###

h_all, w_all = map(int, input().split())
h_b, w_b = map(int, input().split())
 
print((h_all - h_b) * (w_all - w_b))
"""
重さと価値がそれぞれw_i,v_iであるようなn個の品物がある.
これらの品物の中から, 重さの総和がWを超えないように選んだ時の,
価値の総和の最大値を求めよ.
1<=n<=100, 1<=w_i<=10^7, 1<=v_i<=100, 1<=limit_w<=10^9
"""
#-------------------------------------------------------------------------------

#入力
INF = 2000000000
"""
メモ : Pythonでは無限大を表す float('inf') があるが, 処理がかなり重たいので
       代わりにsum(v)より真に大きい 2*10^9 を INFとする.
       (https://atcoder.jp/contests/dp/tasks/dp_e において,PyPyを使用して,
        前者だと1060ms, 後者だと570msで2倍近く差が出ている.)
"""
n ,limit_w = map(int, input().split())
w = [0]*n
v = [0]*n
for i in range(n):
    w[i], v[i] = map(int, input().split())
sum_v = sum(v)
dp = [[INF for i in range(sum_v + 1)] for j in range(n + 1)] 
# dp[i][j]には重さが入る.
# dp[i][j]=(i番目までの品物から価値がちょうどｊになるための重さの最小値)

# ここからメイン
dp[0][0] = 0
for i in range(n):
    for j in range(sum_v + 1):
        if j < v[i]:
            dp[i + 1][j] = dp[i][j]
        else:
            dp[i + 1][j] = min(dp[i][j], dp[i][j - v[i]] + w[i])
            
# n個まで使って,重さがlimit_wを超えないで価値が最大のものを求める.
ans = 0
for i in range(sum_v + 1):
    if dp[n][i] <= limit_w:
        ans = i
print(ans)


### FIXED CODE ###

n= int(input())
h= list(map(int, input().split()))
dp=[0]*n
dp[1]=abs(h[1]-h[0])
for i in range(2,n):
    dp[i]=min(abs(h[i]-h[i-1])+dp[i-1],abs(h[i]-h[i-2])+dp[i-2])
#print(dp)
print(dp[n-1])
n = int(input())
s = input()
ssp = s.split('.')
num = min(s.count(.),s.count('#') - len(ssp[-1]))
if s.count('#') == 0 or s.count('.') == 0:
    print(0)
    exit()
for i in range(n):
    if s[i - 1] == s[i]:
        continue
    num = min(num,s[:i].count('#') + s[i:].count('.'))
print(num)

### FIXED CODE ###

n = int(input())
s = input()
cnt = 0
narabi = []
befores = '#'
for S in s:
    if S == befores:
        cnt += 1
    else:
        narabi.append(cnt)
        befores = S
        cnt = 1
narabi.append(cnt)
if s[-1] == '#':
    narabi.append(0)
hennkann = s.count('.')
saishou = s.count('.')
hashu = 0
dot = 1
for i in range(int(len(narabi) / 2)):
    hennkann = hennkann - narabi[dot] + narabi[hashu]
    saishou = min(saishou,hennkann)
    dot += 2
    hashu += 2
print(saishou)
i = 0
while 1:
   int x = raw_input()
   i = i +1
   if x == '0': 
     break
   print "Case %s: %s" % (i,x)
  

### FIXED CODE ###

i = 0
while 1:
   x = int(raw_input())
   i = i + 1
   if x == 0:
      break
   print 'Case %s: %s' %(i, x)
import math

def process_smaller_index(K, min_index):
    if min_index == 0:
        return 0
    else:
        return math.ceil(min_index / K)

def process_larger_index(last_index, K, min_index):
    if min_index == last_index:
        return 0
    else:
        return math.ceil((last_index - min_index) / K)

N, K = map(int, input().split())
A = [int(i) for i in input().split()]
min_index = A.index(1)
print(process_smaller_index(K - 1, min_index) + process_larger_index(len(A)-1, K - 1, min_index))

### FIXED CODE ###

S = input()
count = 0
for i in S:
    if i == '+':
        count += 1
    elif i == '-':
        count -= 1
print(count)
def con(n,d):
  if d == 0:
    return n
  else:
    return (n - d) * 2

n,m,d = map(int, input().split())
beauty_sum = pow(con(n,d),m-1) * (m - 1)
print(beauty_sum / pow(n,m))


### FIXED CODE ###

def con(n,d):
  if d == 0:
    return 1 / n
  else:
    return (n - d) * 2 / (n ** 2)

n,m,d = map(int, input().split())
beauty = con(n,d) * (m - 1)
print(beauty)
#値の入力
A1 = int(input("A1:"))
A2 = int(input("A2:"))
A3 = int(input("A3:"))

#値が範囲内か
if(1 > A1 or A1 > 13):
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if(1 >A2 or A2 > 13):
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if(1 > A3 or A3 > 13):
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")


### FIXED CODE ###

#値の入力
A1, A2, A3 = map(int, input(). split()) 

#値が範囲内か
if 1 > A1 or A1 > 13:
    print("もう一度入力して下さい")
    A1 = int(input("A1:"))
if 1 >A2 or A2 > 13:
    print("もう一度入力して下さい")
    A2 = int(input("A2:"))
if 1 > A3 or A3 > 13:
    print("もう一度入力して下さい")
    A3 = int(input("A3:"))

#判定
if(A1+ A2+ A3 >= 22):
    print("bust")
else:
    print("win")