Harryxun/stf_run huggingface dataset:
s = str(input())
i = 0
score = 0
str_length = len(s)
while True:
    str_length = len(s)
    if str_length == 2:
        if int(s[0]) ^ int(s[1]) == 1:
            score += 2
            print(score)
            exit()
        else:
            print(score)
            exit()
    i = 0
    while True:
        j = i + 1
        cur_num = int(s[j])
        prev_num = int(s[j-1])
        next_num = int(s[j+1])
        if (cur_num ^ prev_num) == 1:
            score += 2
            s = s[:j-1] + s[j+1:]
            break
            
        elif (cur_num ^ prev_num) == 1:
            score += 2
            s = s[:j] + s[j+2:]
            break
        else :
            i += 1
            if i == str_length:
                print(score)
                exit()
        

### FIXED CODE ###

s = input()
zero = s.count("0")
one = s.count("1")
print(min(zero, one)*2)
a = input().split('/')
if a[0] < 2019:
  print('Heisei')
elif a[1] < 5:
  print('Heisei')
else:
  print('TBD')

### FIXED CODE ###

a = input().rstrip().split('/')
a = list(map(int, a))
if a[0] < 2019:
  print('Heisei')
elif a[1] < 5:
  print('Heisei')
else:
  print('TBD')
N,W = map(int, input().split())
dp = [[None] * (W+1) for i in range(N+1)]
dp[0][0] = 0
for i in range(N):
    w, v = map(int, input().split())
    for j in range(W):#dp[i]:
        if dp[i][j] == None:
            continue
        if j + w <= W:
            dp[i+1][j+w] = max(dp[i][j] + v, dp[i][j+w] or 0)
        dp[i+1][j] = dp[i][j]
print(max([i for i in dp[N] if i != None]))

### FIXED CODE ###

from collections import Counter
from itertools import product

N, W = map(int,input().split())
w2vl = {}
lw = []

for i in range(N):
    w, v = map(int, input().split())
    lw.append(w)
    if w2vl.get(w, None) is None:
        w2vl[w] = []
    w2vl[w].append(v)
    w2vl[w] = sorted(w2vl[w],reverse=True)

ct = Counter(lw)

args = []
ws = []
for w in range(lw[0], lw[0]+4):
    if ct[w] == 0: continue
    args.append(range(ct[w]+1))
    ws.append(w)

a = 0
for i in product(*args):
    w = sum(map(lambda x: x[0] * x[1] ,zip(i,ws)))
    if 1 > w or w > W: continue
    v = sum([sum(w2vl[k][:j]) for j,k in zip(i,ws)])
    if a < v:
        a = v

print(a)
N = int(input())

x,y,z = 1,1,1

def is_true(x,y,z,i):
    if x**2 + y**2 + z**2 + x*y + y*z + z*x == i:
        return True
    return False

loop = int((N-2) ** (1/2)) - 1
for i in range(1,N+1):
    count = 0

    if i < 6:
        print(count)
        continue
    for a in range(loop):
        for b in range(loop):
            for c in range(loop):
                X = x+a
                Y = y+b
                Z = z+c
                if is_true(X,Y,Z,i):
                    count += 1
    print(count)


### FIXED CODE ###

N = int(input())

ans = [0 for _ in range(10050)]

for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            a = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if a < 10050:
                ans[a] += 1
for i in range(1,N+1):
    print(ans[i])
N,K = map(int,input().split())
A = list(map(int,input().split()))
if A[0] == 1:
    print(1)
    exit()
B = [A[0]]
C = []
num = A[0]
Flag = 1
for i in range(N):
    num = A[num-1]
    if num == A[0]:
        Flag = 0
        break
    B.append(num)
if Flag == 1:
    B.reverse()
    C.append(B[0])
    for b in B[1:]:
        if B[0] == b:
            break
        C.append(b)
        l = len(C)
    print(C[K%l-1])
else:
    l = len(B)
    print(B[K%l-1])

### FIXED CODE ###

N,K = map(int,input().split())
A = list(map(int,input().split()))
B = [True]*N
C = [1]
now = 0
while B[now]:
    B[now] = False
    now = A[now] - 1
    C.append(now+1)
start = C.index(C[-1])
D = C[start:-1]
L = len(D)
if K < start:
    print(C[K])
else:
    K -= start
    K %= L
    print(D[K])
N,M = map(int,raw_input().split())

X = map(int,raw_input().split())

X.sort()
gap = []
for i in range(M-1):
    i = M-i-1
    gap.append(X[i]-X[i-1])

gap.sort()
gap.reverse()

gapsum = 0
counter = 0
if len(gap) > 0:
    while N-counter-1 > 0:
        gapsum += gap[counter]
        counter += 1


print abs(X[0]-X[-1])-gapsum

### FIXED CODE ###

N,M = map(int,raw_input().split())

X = map(int,raw_input().split())

X.sort()
gap = []
for i in range(M-1):
    i = M-i-1
    gap.append(abs(X[i]-X[i-1]))

gap.sort()
gap.reverse()

gapsum = 0
counter = 0
if len(gap) > 0:
    while N-counter-1 > 0 and counter < len(gap):
        gapsum += gap[counter]
        counter += 1

print abs(X[0]-X[-1])-gapsum
#!/usr/bin/env python3
from math import gcd
a, b = map(int, input().split())
g = gcd(a, b)
ans = {}
for i in range(2, int(g**0.5 + 1)):
    while g % i == 0:
        ans[i] = ans[i] + 1 if i in ans else 1
        g //= i
if g != 1:
    ans[g] = 1
print(len(ans) + 1)


### FIXED CODE ###

#!/usr/bin/env python3
from fractions import gcd
a, b = map(int, input().split())
g = gcd(a, b)
ans = {}
for i in range(2, int(g**0.5 + 1)):
    while g % i == 0:
        ans[i] = ans[i] + 1 if i in ans else 1
        g //= i
if g != 1:
    ans[g] = 1
print(len(ans) + 1)
n = int(input())
A, = map(int, input().split())
maxA = max(A)
# C[a] = A内のaの個数
C = {a: 0 for a in A}
for a in A:
    C[a] += 1
# D[a]=1: Aにaより小さいaの約数が存在する
D = {a: 0 for a in A}
for a in A:
    if C[a] > 0:
        t = 2
        while a * t <= maxA:
            D[a * t] = 1
            t += 1
ans = 0
for a in A:
    if C[a] == 1 and D[a] == 0:
        ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
*A, = map(int, input().split())
maxA = max(A)
# C[a] = A内のaの個数
C = {a: 0 for a in A}
for a in A:
    C[a] += 1
# D[a]=1: Aにaより小さいaの約数が存在する
D = {a: 0 for a in A}
for a in A:
    if C[a] > 0:
        t = 2
        while a * t <= maxA:
            D[a * t] = 1
            t += 1
ans = 0
for a in A:
    if C[a] == 1 and D[a] == 0:
        ans += 1
print(ans)
import math

num = int(input())

cards = [int(x) for x in input().split()]

res = sum(cards)
res2 = 0

judge = math.inf
if num == 2:
    judge = abs(cards[0]-cards[1])
else:
    for i in cards:
        res -= i
        res2 += i
        div = abs(res - res2)
        judge = div if div < judge else judge

print(judge)

### FIXED CODE ###


num = int(input())

cards = [int(x) for x in input().split()]

res = sum(cards)
res2 = 0

judge = float("inf")

if num == 2:
    judge = abs(cards[0]-cards[1])
else:
    for i in range(0, len(cards)):
        res -= cards[i]
        res2 += cards[i]
        div = abs(res - res2)
        judge = div if div < judge and i != len(cards)-1 else judge

print(judge)
def main():
    N = int(input())
    A = [input() for i in range(N)]
    S = input()
    print(sum(A[S.index():]))


if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    N = int(input())
    A = [input().split() for i in range(N)]
    S = input()
    flag = False
    ans = 0
    for i, a in enumerate(A):
        if a[0] == S:
            flag = True
        elif flag:
            ans += int(a[1])
    print(ans)


if __name__ == '__main__':
    main()
def main():
    N = int(input())
    def prime_list(n):
        prime = [True for _ in range(n+1)]
        prime[0] = False
        prime[1] = False
        for i in range(2,int(n**0.5)+1):
            if not prime[i]:
                continue
            for j in range(i*2,n+1,i):
                prime[j] = False
        return [i for i in range(n+1) if prime[i]]

    prime_list = prime_list(N//2)
    cnt_list = [0 for _ in range(len(prime_list))]
    for i in range(len(prime_list)):
        count = 0
        d = N
        while d >= 1:
            count += d//(prime_list[i])
            d //= prime_list[i]
        cnt_list[i] = count

    def num(X):
        return len(list(filter(lambda x:x>=X-1,cnt_list)))

    print(num(75)+num(15)*(num(5)-1)+num(25)*(num(3)-1)+\
        num(5)*(num(5)-1)*(num(3)-2)//2)

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    N = int(input())

    if N == 1:
        print(0)
    else:
        def prime_list(n):
            prime = [True for _ in range(n+1)]
            prime[0] = False
            prime[1] = False
            for i in range(2,int(n**0.5)+1):
                if not prime[i]:
                    continue
                for j in range(i*2,n+1,i):
                    prime[j] = False
            return [i for i in range(n+1) if prime[i]]

        prime_list = prime_list(N//2)
        cnt_list = [0 for _ in range(len(prime_list))]
        for i in range(len(prime_list)):
            count = 0
            d = N
            while d >= 1:
                count += d//(prime_list[i])
                d //= prime_list[i]
            cnt_list[i] = count

        def num(X):
            return len(list(filter(lambda x:x>=X-1,cnt_list)))

        print(num(75)+num(15)*(num(5)-1)+num(25)*(num(3)-1)+\
            num(5)*(num(5)-1)*(num(3)-2)//2)

if __name__ == "__main__":
    main()
a=int(input())
b=int(input())
c=a+b
print(len(str(c)))

### FIXED CODE ###

while True:
    try:
        a,b=map(int,input().split(' '))
        print(len(str(a+b)))
    except:
        break
# -*- coding: utf-8 -*-

import math

N, M = map(int, input().split())
P = [None] * M
Y = [None] * M
for i in range(M):
    p, y = map(int, input().split())
    P[i] = p
    Y[i] = y

ken = [None] * N
for i in range(N):
    ken[i] = []

for i in range(M):
    ken[P[i] - 1].append(Y[i])


# < M * log(N)
for i in range(N):
    ken[i] = sorted(ken[i])


def close_twopower(n):
    output = 2
    while output < n:
        output = output * 2
    return output


def comp(tr, node, x, i):
    if tr[i] is None:
        return i
    elif x < tr[i][0]:
        return comp(tr, node, x, 2 * i + 1)
    else:
        return comp(tr, node, x, 2 * i + 2)


# 木構造
def create_bitree(a):
    # a = [[int, hoge, ...], ...]
    n = len(a)
    output = [None] * int(math.pow(2, n))

    for i in range(n):
        # output = comp(output, a[i], a[i][0], 0)
        output[comp(output, a[i], a[i][0], 0)] = a[i]

    return output


city_info = [None] * M
k = 0

# count M
while(k < M):
    for l in range(N):
        for m in range(len(ken[l])):
            # ken[l][m]の値によって二分木を作る
            # create_bitree()

            city_info[k] = [ken[l][m], l + 1, m + 1]
            k += 1

bi_city_info = create_bitree(city_info)


def create_id(p, x):
    output_p = str(p)
    output_x = str(x)
    p_len = len(output_p)
    x_len = len(output_x)
    while p_len < 6:
        output_p = "0" + output_p
        p_len += 1
    while x_len < 6:
        output_x = "0" + output_x
        x_len += 1

    return output_p + output_x


def comp2(tr, x, i):
    if tr[i][0] == x:
        return i
    elif x < tr[i][0]:
        return comp2(tr, x, 2 * i + 1)
    else:
        return comp2(tr, x, 2 * i + 2)

    return 0  # dummy


def bi_search(tr, x):
    # tr is [[int. hoge, ...]
    return comp2(tr, x, 0)


# 律速
# M^2
for i in range(M):
    # Y[i]を探してきてprint
    j = bi_search(bi_city_info, Y[i])
    print(create_id(bi_city_info[j][1], bi_city_info[j][2]))


### FIXED CODE ###

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

# from time import time
# 
# start = time()


def six(n):
    n_str = str(n)
    while len(n_str) < 6:
        n_str = "0" + n_str

    return n_str


N, M = map(int, input().split())

id_list = [None] * M
dic_P = {}
info = []
info_idx = 0

for i in range(M):
    P, Y = map(int, input().split())
    id_list[i] = [P, Y, ""]
    if P in dic_P.keys():
        info[dic_P[P]].append([i, P, Y])
    else:
        dic_P[P] = info_idx
        info_idx += 1
        info.append([[i, P, Y]])

for group in info:
    group.sort(key=lambda a_i: a_i[2], reverse=False)
    for i, pair in enumerate(group):
        id = six(pair[1]) + six(i+1)
        id_list[pair[0]] = id

for id in id_list:
    print(id)

# print(time() - start)
n, W = map(int, input().split())
w = []
v = []
for i in range(n):
    w_, v_ = map(int, input().split())
    w.append(w_)
    v.append(v_)

dp = [[0] * (W + 1) for i in range(n + 1)]  # DP テーブル

for i in range(n - 1, -1, -1):
    for j in range(w[0], W + 1):
        if j < w[i]:
            dp[i][j] = dp[i + 1][j]
        else:
            dp[i][j] = max(dp[i + 1][j], dp[i + 1][j - w[i]] + v[i])

print(dp[0][W])

### FIXED CODE ###

N, W = map(int, input().split())
w = []
v = []
for i in range(N):
    wi, vi = map(int, input().split())
    w.append(wi)
    v.append(vi)
ww = [w[0], w[0]+1, w[0]+2, w[0]+3]
d = {}
for i in range(4):
    d[ww[i]] = []
for i in range(N):
    d[w[i]].append(v[i])
for i in range(4):
    d[ww[i]] = sorted(d[ww[i]], reverse=True)
    
ans = 0
for i in range(N+1):
    if len(d[ww[0]]) < i:
        # print('break i: {}'.format(i))
        break
    for j in range(N+1):
        if i + j > N or len(d[ww[1]]) < j:
            # print('break i, j: {}, {}'.format(i, j))
            break
        for k in range(N+1):
            if i + j + k > N or len(d[ww[2]]) < k:
                # print('break i, j, k: {}, {}, {}'.format(i, j, k))
                break
            for l in range(N+1):
                # print(ww[0] * i + ww[1] * j + ww[2] * k + ww[3] * l)

                if i + j + k + l > N or\
                        len(d[ww[3]]) < l or\
                        ww[0] * i + ww[1] * j +\
                        ww[2] * k + ww[3] * l > W:
                    # print('break i, j, k: {}, {}, {}, {}'.format(i, j, k, l))
                    break

                av = sum([d[ww[0]][p] for p in range(i)])
                bv = sum([d[ww[1]][p] for p in range(j)])
                cv = sum([d[ww[2]][p] for p in range(k)])
                dv = sum([d[ww[3]][p] for p in range(l)])
                ans = max(ans, av+bv+cv+dv)
print(ans)
def main():
  N = int(input())

  d = {}
  tmp = []
  for i in range(N):
    s = input()
    x = sorted(s)
    if x in tmp:
      d[tmp.index(x)] += 1
    else:
      d[i] = 1 
      tmp.append(x)
  cnt = 0
  for k, v in d.items():
    if v == 1:
      continue
    if v == 2:
      cnt += 1
    elif v == 3:
      cnt += v
    else:
      cnt += sum(list(range(1,v)))

  print(cnt)
if __name__ == "__main__":
  main()

### FIXED CODE ###

def main():
  N = int(input())
  S = [input() for _ in range(N)]

  d = {}
  for i, s in enumerate(S):
    x = "".join(sorted(s))
    if x in d:
      d[x] += 1
    else:
      d[x] = 1
  
  cnt = 0
  for v in d.values():
    if v == 1:
      continue
    if v == 2:
      cnt += 1
    elif v == 3:
      cnt += v
    else:
      cnt += sum(list(range(1,v)))

  print(cnt)
if __name__ == "__main__":
  main()
a=1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51
p=a.split(",")
K=4
print([K+1])

### FIXED CODE ###

K=int(input())
list=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(list[K-1])
import math
N, a, b = map(int,input().split())
p = 10 ** 9 +7
A = math.factorial(a)
B = math.factorial(b)
n_c_a = 1
n_c_b = 1
for i in range(a):
  n_c_a *= N-i
for j in rnage(b):
  n_c_b *= N-j
m_a = (n_c_a*pow(A,p-2))% p
m_b = (n_c_b*pow(B,p-2))% p
print((pow(2,N) - 1 - m_a - m_b) % p)


### FIXED CODE ###

N, a, b = map(int,input().split())
p = pow(10,9) + 7
def comb(n,r):
  bunshi = 1
  for i in range(n-r+1, n+1):
    bunshi =bunshi * i % p
  bunbo = 1
  for i in range(1, r+1):
    bunbo = bunbo * i % p
  return bunshi * pow(bunbo, p-2, p)
print((pow(2,N, p) - 1 - comb(N,a) - comb(N,b)) % p)
N = int(input())
A = [int(i) for i in input().split()]
diff = [0] * N
for i in range(N):
    diff[i] = A[i] - (i+1)
diff.sort

b1 = diff[len(diff) - 1 // 2]
b2 = diff[(len(diff)) // 2]

ans1 = 0
for i, a in enumerate(A):
    ans1 += abs(a - (i+1+b1))
ans2 = 0
for i, a in enumerate(A):
    ans2 += abs(a - (i+1+b2))
print(min(ans1, ans2))


### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]
for i in range(N):
    A[i] = A[i] - (i+1)
A.sort()
b = A[N//2]
ans = 0
for a in A:
    ans += abs(a - b)
print(ans)
def main():
  N=int(input())
  D=[0]*(10**6+1)

  for a in sorted(map(int,input().split())):
    if D[a]==0:
      D[a]=1
      for i in range(2*a,10**6+1,a):
        D[i]=-1
    else:
      D[a]=-1

  print(D.count(1))

main()


### FIXED CODE ###

print([int(x) for x in input().split()].index(0)+1)
s = input()

if s = 'Sunny':
  print('Cloudy')
elif s = 'Cloudy':
  print('Rainy')
else:
  print('Sunny')

### FIXED CODE ###

s = input()
 
if s == 'Sunny':
  print('Cloudy')
elif s == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')
T, N = list(map(int,input().split()))

ans_c = 1001
for i in range(T):
    c, t = list(map(int,input().split()))
    if (N >= t) and (c <= ans_c):
        ans_c = c

if ans_t == 1001:
    print("TLE")
else:
    print(ans_c)

### FIXED CODE ###

T, N = list(map(int,input().split()))

ans_c = 1001
for i in range(T):
    c, t = list(map(int,input().split()))
    if (N >= t) and (c <= ans_c):
        ans_c = c

if ans_c == 1001:
    print("TLE")
else:
    print(ans_c)
a,b,c = int(input())
print('Yes' if a == c else 'No')

### FIXED CODE ###

a,b,c = input()
print('Yes' if a == c else 'No')
N = int(input())
    if N == 1:
        print("Hello World")
    elif N == 2:
        a,b = int(input().split())
        print(a+b)

### FIXED CODE ###

n = int(input())
if n == 1:
    print("Hello World")
elif n == 2:
    a = int(input())
    b = int(input())
    print(a + b)
N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]


MPs = {}
for a, b in ABs:
    # この書き方でa,bが取り出せる
    a = int(a)  # intに直すには先に直しておく
    b = int(b)
    if a not in MPs:
        MPs[a] = 1
    else:
        MPs[a] += 1
    if b not in MPs:
        MPs[b] = 1
    else:
        MPs[b] += 1

for mp in range(1, N+1):
    print(MPs[mp])


### FIXED CODE ###

N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]
 
 
MPs = {}
for a, b in ABs:
    a = int(a)
    b = int(b)
    if a not in MPs:
        MPs[a] = 1
    else:
        MPs[a] += 1
    if b not in MPs:
        MPs[b] = 1
    else:
        MPs[b] += 1
 
for mp in range(1, N+1):
    if mp not in MPs:
        MPs[mp] = '0'
 
for _, y in sorted(MPs.items()):
    print(y)
N,A,B=map(int,input().split());print(N/B*A+min(N%B,A))

### FIXED CODE ###

N,A,B=map(int,input().split());B+=A;print(N//B*A+min(N%B,A))
import sys
N, K = list(map(int, input().split()))
A_N = list(map(int, input().split()))
B = []
b = 0
for i in range(N-1):
    for j in range(N-1):
        if i <= j:
            b = A_N[i] * A_N[j+1]
            B.append(b)
            b = 0
B = sorted(B)
# print(B)
print(B[K-1])




### FIXED CODE ###

import sys
A, B, C = list(map(str, input().split()))

if A == B and A != C and B != C:
    print("Yes")
elif B == C and B != A and C != A:
    print("Yes")
elif C == A and C != B and A != B:
    print("Yes")
else:
    print("No")
s = str(input())

if s == "Sunny":
    print(Cloudy)
elif s == "Cloudy":
    print(Rainy)
else:
    print(Sunny)

### FIXED CODE ###

s = str(input())

if s == "Sunny":
    print("Cloudy")
elif s == "Cloudy":
    print("Rainy")
else:
    print("Sunny")
S==input()
if S=='Sunny':
  print("Cloudy")
elif S=='Cloudy':
  print("Rainy")
elif S=='Rainy':
  print("Sunny")

### FIXED CODE ###

S=input()
if S=='Sunny':
  print('Cloudy')
elif S=='Cloudy':
  print('Rainy')
elif S=='Rainy':
  print('Sunny')
a,b,c,x = map(int,[input() for i in range(4)])
c = 0
for i in range(a+1):
    for j in range(b+1):
        for n in range(c+1):
            if t = i*500 + j*100 + n*50 == x:
                c = c + 1
print(c)

### FIXED CODE ###

a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i*500 + j*100 + k*50 == x:
                count+=1
print(count)
k = int(input())
s = input()
mod = 10**9+7

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

modp = mod
max_n = 10 ** 6  # 必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod modp)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod modp)
inv = [0, 1]  # factinv 計算用

for i in range(2, max_n + 1):
    fact.append((fact[-1] * i) % modp)
    inv.append((-inv[modp % i] * (modp // i)) % modp)
    factinv.append((factinv[-1] * inv[-1]) % modp)


ans = 0
for i in range(k+1):
    now = pow(26, k-i, mod)
    now = (now * pow(25, i, mod))%mod
    now = (now * cmb(i+len(s)-1, len(s)-1, mod))%mod
    ans += now
print(ans%mod)

### FIXED CODE ###

k = int(input())
s = input()
mod = 10**9+7

def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

modp = mod
max_n = k + len(s)+1 # 必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod modp)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod modp)
inv = [0, 1]  # factinv 計算用

for i in range(2, max_n + 1):
    fact.append((fact[-1] * i) % modp)
    inv.append((-inv[modp % i] * (modp // i)) % modp)
    factinv.append((factinv[-1] * inv[-1]) % modp)

ans = 0
for i in range(k+1):
    now = pow(26, k-i, mod)
    now = (now * pow(25, i, mod))%mod
    now = (now * cmb(i+len(s)-1, len(s)-1, mod))%mod
    ans += now
print(ans%mod)
from sys import stdin
from math import floor

def main():
    for line in stdin:
        factors_str = line.split()
        break

    a = factor[0]
    b = factor[1] * 100
    prod = a * b / 100

    print(floor(prod))

main()

### FIXED CODE ###

from sys import stdin

def main():
    for line in stdin:
        factors = line.split()
        break

    print(int(factors[0]) * int(factors[1]))

main()
W,H,N=map(int,input().split())
X=[w for w in range(W+1)]
Y=[h for h in range(H+1)]
#print(X,Y)
for n in range(N):
    w,h,a=map(int,input().split())
    if a==1:
        X=[x for x in X if x>=w]
    elif a==2:
        X=[x for x in X if x<=w]
    elif a==3:
        Y=[y for y in Y if y>=h]
    else:
        Y=[y for y in Y if y<=h]
    #print(X,Y)
#print(max(0,(len(X)-1)*(len(Y)-1)))
print(max(0,(X[-1]-X[0])*(Y[-1]-Y[0])))


### FIXED CODE ###

W,H,N=map(int,input().split())
X=[w for w in range(W+1)]
Y=[h for h in range(H+1)]
for n in range(N):
    w,h,a=map(int,input().split())
    if a==1:
        X=[x for x in X if x>=w]
    elif a==2:
        X=[x for x in X if x<=w]
    elif a==3:
        Y=[y for y in Y if y>=h]
    else:
        Y=[y for y in Y if y<=h]
if len(X)<2 or len(Y)<2:
  print(0)
else:
  print((len(X)-1)*(len(Y)-1))
S=input()
If S[2]==S[3] and S[4]==S[5]:
  print('Yes')
else:
  print('No')
  


### FIXED CODE ###

S = input()
if S[2] == S[3] and S[4] == S[5]:
  print('Yes')
else:
  print('No')
N = int(input())
A = map(int, input().split())
xyz,T = [0,0,0],1
for Ai in A:
  T = (T*xyz.count(Ai))%1000000007
  xyz[xyz.index(Ai)] += 1
print(T)

### FIXED CODE ###

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

T = 1
xyz = [0]*3
for Ai in A:
  if xyz.count(Ai)>0:
    T = (T * xyz.count(Ai))%1000000007
    xyz[xyz.index(Ai)] += 1
  else:
    T = 0
    break
print(T)
n = int(input())
lis = list(map(int,input().split()))
for i in range(n-1):
  if lis[i] -1 >= lis[i+1]:
    lis[i] -= 1
for i in range(n-1):
  if lis[i] > lis[i+1]:
    print("No")
    exit()
print("Yes")


### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1,n+1):
  if len(str(i)) % 2 == 1:
    ans += 1
print(ans)