Harryxun/stf_run huggingface dataset:
# python template for atcoder1
import sys

N, A, B, C, D = map(int, input().split())
L = list([v for v in input()])

HOP = [1, 2]
dp_d = [0]*N
dp_d[B-1] = 1
for i in range(N):
    if L[i] == "#":
        continue
    for h in HOP:
        dst = i+h
        if dst < N and L[dst] == ".":
            dp_d[dst] = max(dp_d[dst], dp_d[i])
dp_c = [0]*N
dp_c[A-1] = 1
for i in range(N):
    if L[i] == "#":
        continue
    for h in HOP:
        dst = i+h
        if dst < N and L[dst] == ".":
            dp_c[dst] = max(dp_c[dst], dp_c[i])
reachable = False
if dp_c[C-1] == 1 and dp_d[D-1] == 1:
    reachable = True

if not reachable:
    print("No")
elif C < D:
    print("Yes")
else:
    if "..." in "".join(L[B-2:min(C, D)]):
        print("Yes")
	e;se:
      print("No")

### FIXED CODE ###

# python template for atcoder1
import sys

N, A, B, C, D = map(int, input().split())
L = list([v for v in input()])

HOP = [1, 2]
dp_d = [0]*N
dp_d[B-1] = 1
for i in range(N):
    if L[i] == "#":
        continue
    for h in HOP:
        dst = i+h
        if dst < N and L[dst] == ".":
            dp_d[dst] = max(dp_d[dst], dp_d[i])
dp_c = [0]*N
dp_c[A-1] = 1
for i in range(N):
    if L[i] == "#":
        continue
    for h in HOP:
        dst = i+h
        if dst < N and L[dst] == ".":
            dp_c[dst] = max(dp_c[dst], dp_c[i])
reachable = False
if dp_c[C-1] == 1 and dp_d[D-1] == 1:
    reachable = True

if not reachable:
    print("No")
elif C < D:
    print("Yes")
else:
    if "..." in "".join(L[B-2:min(C, D)+1]):
        print("Yes")
    else:
        print("No")
print(i, sum)
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


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

def count(st, n):
    ans = (b - st + 1) // n
    return ans


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd(a, b)


sum = 0
cc = 0
cflag = True
dflag = True
cdflag = True
for i in range(a, b + 1):
    if i % c == 0 and cflag:
        sum += count(i, c)
        cc += 1
        cflag = False
    if i % d == 0 and dflag:
        if dflag:
            sum += count(i, d)
            cc += 1
            dflag = False
        if i % c == 0 and cdflag:
            l = lcm(c, d)
            sum -= count(i, l)
            cc += 1
            cdflag = False
    if cc == 3:
        break
print(b - a + 1 - sum)


### FIXED CODE ###

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def lcm(a, b):
    return a * b // gcd(a, b)


def count(n):
    return b // n - (a - 1) // n


a, b, c, d = map(int, input().split())
print(b - a + 1 - (count(c) + count(d) - count(lcm(c, d))))
n = int(input())

for x in range(1, 3500 + 1):
    for y in range(1, 3500 + 1):
        p = n * x * y
        q = 4 * x * y - n * (x + y)
        if p % q == 0:
            print(p, q, p // q)
            break

### FIXED CODE ###

N = int(input())

w = -1
flg = False
for h in range(1, 3500 + 1):
    for n in range(h, 3500 + 1):
        q = 4 * n * h - N * (n + h)
        #print(h, n, p, q)
        if q > 0:
            #q == 0: 1/wなしで4/Nに等しくなり不適（w無限大）
            #q < 0: p > 0より、w < 0となり不適
            p = N * n * h
            if p % q == 0:
                w = p // q
                flg = True
                break
    if flg:
        break
print(h, n, w)
H, W = map(int, input().split())
S = [input() for _ in range(H)]
# print(S)

V = H*W
d = [[float("inf") for _ in range(V)] for _ in range(V)]
for i in range(H):
    for j in range(W):
        if S[i][j] == '.':
            v = i*H + j
            d[v][v] = 0
            if i != 0 and S[i-1][j] == '.':
                x = (i-1)*H + j
                d[v][x] = 1
                d[x][v] = 1
            if i != H-1 and S[i+1][j] == '.':
                x = (i+1)*H + j
                d[v][x] = 1
                d[x][v] = 1
            if j != 0 and S[i][j-1] == '.':
                x = i*H + j-1
                d[v][x] = 1
                d[x][v] = 1
            if j != W-1 and S[i][j+1] == '.':
                x = i*H + j+1
                d[v][x] = 1
                d[x][v] = 1

def warshall_floyd(d):
    #d[i][j]: iからjへの最短距離
    for k in range(V):
        for i in range(V):
            for j in range(V):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d

d = warshall_floyd(d)
# print(d)
ans = 0
for i in range(V):
    for j in range(V):
        if d[i][j] != float("inf"):
            ans = max(ans, d[i][j])

print(ans)


### FIXED CODE ###

INF = 1001001001
from collections import deque
h,w = map(int,input().split())
s = [input() for _ in range(h)]
di = (-1, 0, 1, 0)
dj = ( 0,-1, 0, 1)

ans = 0
for si in range(h):
    for sj in range(w):
        if s[si][sj] == '#': continue
        dist = [[INF] * w for _ in range(h)]
        dist[si][sj] = 0
        q = deque([(si,sj)])
        while len(q) > 0:
            i,j = q.popleft()
            for dir in range(4):
                ni = i + di[dir]
                nj = j + dj[dir]
                if (ni<0 or ni>=h or nj<0 or nj>=w): continue
                if s[ni][nj] == '#': continue
                if dist[ni][nj] != INF: continue
                q.append((ni,nj))
                dist[ni][nj] = dist[i][j] + 1
        for i in range(h):
            for j in range(w):
                if dist[i][j] == INF: continue
                ans = max(ans, dist[i][j])
print(ans)
import functools


def divise(n, divisor):
    if n % divisor == 0 and n != divisor:
        return 0
    else:
        return n

number = int(input())
origin = [int(input()) for _ in range(number)]

divised = origin

for i in range(2, max(origin)+1):
    divised = list(map(functools.partial(divise, divisor=i), divised))

for j in range(number):
    if divised[j] == 0:
        origin.pop(j)

print(len(origin))

### FIXED CODE ###

def is_prime(n):
    i = 2
    while i * i <= n:
        if n % i == 0:
            return False
        i += 1
    return True

count = 0

number = int(input())
for i in range(number):
    n = int(input())
    if is_prime(n):
        count = count + 1

print(count)
s = input()
s2 = [*s]
s3 = list(set(s2))
print('yes' if len(s2) == len(s3) else 'no')


### FIXED CODE ###

s = input()
s2 = list(s)
s3 = list(set(s2))
print('yes' if len(s2) == len(s3) else 'no')
n = int(input())
l = [2, 1]
for i in range(n-1):
    L = l[i] + l[i+1]
    l.append(L)
print(L)

### FIXED CODE ###

n = int(input())
l = [2, 1]
for i in range(n-1):
    L = l[i] + l[i+1]
    l.append(L)
print(l[n])
import sys
for line in sys.stdin:
  if line == 0: break
  print("Case" " " line ":" )

### FIXED CODE ###

import sys
count = 1
while True:
  x = sys.stdin.readline().strip()
  if x == "0":
    break
  print("Case %d: %s" %(count,x))
  count = count + 1
n, m = map(int, input().split())
edges = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    edges[a - 1].append(b - 1)

def dfs(index, visited):
    visited[index] = True
    for i in edges[index]:
        if visited.get(i):
            return [i]
        ret = dfs(i, visited)
        if ret:
            return [i] + ret
    visited[index] = False
    return None

def find_local_minimum(cycle):
    n = len(cycle)
    ind = {v: i for (i, v) in zip(range(n), cycle)}
    ret = []
    i = 0
    while True:
        ret.append(i)
        nxt = 0
        for j in [ind[v] for v in edges[cycle[i]] if v in ind]:
            if j < i:
                j += n
            nxt = max(nxt, j)
        if nxt >= n:
            ret = ret[ret.index(nxt % n):]
            break
        i += 1
        while i < nxt:
            del ind[cycle[i]]
            i += 1
    return [cycle[i % n] for i in ret]

cycle = None
visited = {}
for start in range(n):
    if start not in visited:
        cycle = dfs(start, visited)
        if cycle:
            break

if cycle:
    ret = find_local_minimum(cycle)
    print(len(ret))
    for i in ret:
        print(i + 1)
else:
    print(-1)



### FIXED CODE ###

n, m = map(int, input().split())
edges = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    edges[a - 1].append(b - 1)

ret = [0] * (n + 1)
for start in range(n):
    parent = [-1] * n
    q = [start]
    while len(q) > 0:
        i = q.pop(0)
        for j in edges[i]:
            if j == start:
                loop = [i]
                while i != start:
                    i = parent[i]
                    loop.append(i)
                if len(ret) > len(loop):
                    ret = loop
                break
            if parent[j] == -1:
                parent[j] = i
                q.append(j)

if len(ret) > n:
    print(-1)
else:
    print(len(ret))
    for i in reversed(ret):
        print(i + 1)
import sys
import math

def lcm(a, b):
  return (a * b) // math.gcd(a, b)


a,b,c,d = [int(x) for x in sys.stdin.readline().rstrip().split(" ")]
e = b - a + 1
f = int(b / c) - int((a - 1) / c)
g = int(b / d) - int((a - 1) / d)
cd = lcm(c, d)
h = int(b / cd) - int((a - 1) / cd)
n = e - f - g + h
print(n)


### FIXED CODE ###

import sys
import math

def gcd(a, b):
  if b == 0:
    return a
  else:
    return gcd(b, a % b)

def lcm(a, b):
  return (a * b) // gcd(a, b)

  
a,b,c,d = [int(x) for x in sys.stdin.readline().rstrip().split(" ")]
e = b - a + 1
if c == d:
  fgh = (b // c) - ((a - 1) // c)
  n = e - fgh
  print(n) 
else:
  f = (b // c) - ((a - 1) // c)
  g = (b // d) - ((a - 1) // d)
  cd = lcm(c, d) 
  h = (b // cd) - ((a - 1) // cd)
  n = e - f - g + h
  print(n)
n , m = map(int, input().split())
a = [input() for _ in range(n)]
b = [input() for _ in range(m)]
#i, j はBの左端
for i in range(n-m+1):
    ans = True
    for j in range(n-m+1):
        for k in range(m):
            if a[i + k][j:j+m] != b[k]:
                ans = False
        if ans == True:
            break
    else:
        continue
    break

if ans == True:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

a, b = map(int, input().split())
if a == 1 and b!= 1:
    print("Alice")
elif b == 1 and a != 1:
    print("Bob")
elif a > b:
    print("Alice")
elif b > a:
    print("Bob")
else:
    print("Draw")
a, b, c = map(int,raw_input().split())
i = a
j = 0
for i in range(b-a+1):
  if c % i == 0:
    j = j + 1
print j
    

### FIXED CODE ###

a, b, c = map(int,raw_input().split())
j = 0
for i in range(a, b+1):
  if c % i == 0:
    j = j + 1
print j
import sys
sy=sys.stdin.readline

n=int(sy())
dp=[0]*(n+1)
lis=[0]*(n+1)
dp[0],dp[1],dp[2]=0,1,1
c1=int(sy())
c2=int(sy())
lis[c1]=1
lis[c2]=2
for i in range(3,n+1):
    c1=c2
    c2=int(sy())
    if c1==c2 or lis[c2]==0:
        dp[i]=dp[i-1]
    else:
        dp[i]=dp[i-1]+dp[lis[c2]]
    lis[c2]=i
print(dp[n])

### FIXED CODE ###

import sys
sy=sys.stdin.readline

n=int(sy())
if n==1:
    print(1)
    quit()
dp=[0]*(n+1)
lis=[0]*(2*10**5+1)
dp[0],dp[1],dp[2]=0,1,1
c1=int(sy())
c2=int(sy())
lis[c1]=1
lis[c2]=2
for i in range(3,n+1):
    c1=c2
    c2=int(sy())
    if c1==c2 or lis[c2]==0:
        dp[i]=dp[i-1]
    else:
        dp[i]=dp[i-1]+dp[lis[c2]]
    lis[c2]=i
    dp[i]%=1000000007
print(dp[n])
H, W = list(map(int, input().split()))
S = [list(input()) for _ in range(H)]
import queue
import copy
class gridMan:
  def __init__(s, L):
    s.L = L
  def makeWall(s, x):
    w = len(s.L[0]) + 2
    s.L = [[x] * w] + [[x] + i + [x] for i in s.L] + [[x] * w]
  def dist(s, S, G):
    T = copy.deepcopy(s.L)

    T[S[0] + 1][S[1] + 1] = 1
    q = queue.Queue()
    q.put([S[0] + 1, S[1] + 1])
    while not q.empty():
      h, w = q.get()
      k = T[h][w]
      for i, j in [[1, 0], [-1, 0], [0, 1], [0, -1]]:
        hh = h + i
        ww = w + j
        if T[hh][ww] == -1:
          continue
        t = T[hh][ww]
        if t == 0:
          q.put([hh, ww])
          T[hh][ww] = k + 1
    return T[G[0] + 1][G[1] + 1] - 1

for i in range(H):
  for j in range(W):
    if S[i][j] == "#":
      S[i][j] = -1
    else:
      S[i][j] = 0

g = gridMan(S)
g.makeWall(-1)
ans = 0
for sx in range(H):
  for sy in range(W):
    if S[sx][sy] == -1:
      continue
    for gx in range(sx, H):
      for gy in range(W):
        if S[sx][sy] == -1:
          continue
        if sx == gx and sy == gy: continue
        ans = max(ans, g.dist([sx, sy], [gx, gy]))

g.dist([0, 0], [2, 2])
print(ans)

### FIXED CODE ###

H, W = list(map(int, input().split()))
S = [list(input()) for _ in range(H)]
import queue
import copy
class gridMan:
  def __init__(s, L):
    s.L = L
  def makeWall(s, x):
    w = len(s.L[0]) + 2
    s.L = [[x] * w] + [[x] + i + [x] for i in s.L] + [[x] * w]
  def dist(s, S):
    T = copy.deepcopy(s.L)
    T[S[0] + 1][S[1] + 1] = 1
    q = queue.Queue()
    q.put([S[0] + 1, S[1] + 1])
    ans = 0
    while not q.empty():
      h, w = q.get()
      k = T[h][w]
      ans = max(ans, k)
      for i, j in [[1, 0], [-1, 0], [0, 1], [0, -1]]:
        hh = h + i
        ww = w + j
        if T[hh][ww] == -1:
          continue
        t = T[hh][ww]
        if t == 0:
          q.put([hh, ww])
          T[hh][ww] = k + 1
    return ans - 1

for i in range(H):
  for j in range(W):
    if S[i][j] == "#":
      S[i][j] = -1
    else:
      S[i][j] = 0

g = gridMan(S)
g.makeWall(-1)
ans = 0
for sx in range(H):
  for sy in range(W):
    if S[sx][sy] == -1:
      continue
    ans = max(ans, g.dist([sx, sy]))

print(ans)
N = int(input())
S = input()
Q = int(input())
set_dic = {}
for i, s in enumerate(S):
    if s not in set_dic.keys():
        set_dic[s] = {i+1}
    else:
        set_dic[s].add(i+1)

anslist = []
for _ in range(Q):
    query = input()
    if query[0] == "1":
        i = int(query[2])
        c = query[4]
        for l in set_dic.values():
            l.discard(i)
        if c not in set_dic.keys():
            set_dic[c] = {i}
        else:
            set_dic[c].add(i)
    else:
        l = int(query[2])
        r = int(query[4])
        ans = 0
        for eachset in set_dic.values():
            for i in range(l, r+1):
                if i in eachset:
                    ans += 1
                    break
        anslist.append(ans)

for i in anslist:
    print(i)

### FIXED CODE ###

import bisect
import sys
input = sys.stdin.readline

def solve():
    N = int(input())
    S = list(input())
    Q = int(input())
    set_dic = {}

    for i, s in enumerate(S):
        if s not in set_dic:
            set_dic[s] = [i+1]
        else:
            bisect.insort_left(set_dic[s], i+1)

    anslist = []

    for _ in range(Q):
        query1, query2, query3 = input().split()
        if query1 == "1":
            i = int(query2)
            c = query3
            cap = S[i-1]
            if cap == c:
                continue
            set_dic[cap].remove(i)
            if c not in set_dic:
                set_dic[c] = [i]
            else:
                bisect.insort_left(set_dic[c], i)
            S[i-1] = c
        else:
            l = int(query2)
            r = int(query3)
            ansset = set()
            ans = 0
            for eachlist in set_dic.values():
                li = bisect.bisect_left(eachlist, l)
                ri = bisect.bisect_right(eachlist, r)
                if li != ri:
                    ans += 1
            anslist.append(ans)

    for i in anslist:
        print(i)

if __name__ == '__main__':
    solve()
"""
A高橋体力
B高橋攻撃力
C青木体力
D青木攻撃力
"""

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

while(true):
  c=c-b
  	if c<=0:
  		#takahasi win
  		print("Yes")
  		break
  a=a-d
  	if c<=0:
  		#takahasi win
  		print("No")
  		break


### FIXED CODE ###


a, b, c, d = map( int, input().split() )
#print( a, b, c, d )
 
for i in range( 200 ):
    c = c - b
    if c <= 0:
        print( "Yes" )
        exit()
 
    a = a - d
    if a <= 0:
        print( "No" )
        exit()
def main15():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    data2 = input().split()
    num2 = []
    for i in range(num[0]):
        num2.append(int(data2[i]))
    length = 0
    result = 1
    for i in range(num[0]):
        length = length + num[2]
        if length > num[1]:
            break
        else:
            result = result + 1
    print(result)

if __name__ == "__main__":
    main15()

### FIXED CODE ###

def main15():
    data = input().split()
    num = []
    for i in range(2):
        num.append(int(data[i]))
    data2 = input().split()
    num2 = []
    for i in range(num[0]):
        num2.append(int(data2[i]))
    length = 0
    result = 1
    for i in range(num[0]):
        length = length + num2[i]
        if length > num[1]:
            break
        else:
            result = result + 1
    print(result)

if __name__ == "__main__":
    main15()
while True:
	try:
		a,b = map(int raw_input().split())
		print len(str(a+b))
	except EOFerror:
		break

### FIXED CODE ###

while True:
	try:
		a,b = map(int, raw_input().split())
		print len(str(a+b))
	except EOFError:
		break
r = int(inputs())

print(r*r)

### FIXED CODE ###

r = int(input())
     
print(r*r)
import numpy as np

L, R = map(int, input().split(" "))
arr = np.array(np.arange(L, R+1))
mod_list = []
min_mod_list = []

if (0 in (arr % 2019)) or (0 in arr):
  print(0)
else:
  for i in arr:
    mod_list = []
    index_ = np.where(arr==i)
    if i == arr[-1]:
      break

    for j in arr[int(index_[0])+1:]:
      mod_list.append((i * j) % 2019)
    
    min_mod_list.append(min(mod_list))
    
  
  print(min(min_mod_list))

### FIXED CODE ###

import numpy as np

L, R = map(int, input().split(" "))
#L, R = 2020, 4000000000
if R - L > 2019:
    print(0)
else:
    arr = np.array(np.arange(L, R+1))
    mod_list = []
    min_mod_list = []
    
    if (0 in (arr % 2019)) or (0 in arr):
        print(0)
    else:
    
        for i in arr:
            mod_list = []
            index_ = np.where(arr==i)
            if i == arr[-1]:
                break
            
            for j in arr[int(index_[0])+1:]:
                mod_list.append((i * j) % 2019)
     
            min_mod_list.append(min(mod_list))
            if min(mod_list) == 0:
                break
    
    
        print(min(min_mod_list))
N = int(input())
A = list(map(int, input().split()))

A.sort(reverse=True)
ans = 0

if N%2 == 1:
	k = (N+1)/2
	for i in range(k):
		ans += A[i]*2
	ans -= A[0]
	ans -= A[k]
	print(ans)
else:
	k = N/2
	for i in range(k):
		ans += A[i]*2
	ans -= A[0]
	print(ans)

### FIXED CODE ###

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

A.sort(reverse=True)
ans = 0

for i in range(N-1):
	ans += A[(i+1)//2]

print(ans)
N, M = map(int, input().split())
a = [int(input()) for i in range(M)]
ans = [0] * (N+1)
ans[0] = 1
if a[0] != 1:   ans[1] = 1
else:   pass
for i in range(2, N+1):
    if i in a:
        ans[i] = 0
    else:
        ans[i] = (ans[i-1] + ans[i-2]) % (10**9+7)
print(ans[N])

### FIXED CODE ###

import bisect
N, M = map(int, input().split())
if N == 1:
    print(1)
    exit()

a = [int(input()) for i in range(M)]
broken = [0]*(N+1)
for i in range(M):
    broken[a[i]] = 1
if M == 0:  a.append(0)
ans = [0] * (N+1)
ans[0] = 1
if a[0] != 1:   ans[1] = 1
else:   pass
for i in range(2, N+1):
    if broken[i] == 1:
        ans[i] = 0
    else:
        ans[i] = (ans[i-1] + ans[i-2]) % (10**9+7)
print(ans[N])
import math
a,b = map(str,input().split())
a = int(a)
b_ =str()
for i in b:
    if(i != "."):
        b_ = b_ +i
# print(b_)
ans = (a*b_)//100
print(ans)

### FIXED CODE ###

import math
a,b = map(str,input().split())
a = int(a)
b_ =str()
for i in b:
    if(i != "."):
        b_ = b_ +i
# print(b_)
b_ = int(b_)
ans = (a*b_)//100
print(ans)
#!/usr/bin/env python3


def dp(index, cos):
    if index == N-1:
        cost.append(cos)

    if index+1<N:
        d = dp(index+1, cos+abs(H[index]-H[index+1]))
    if index+2<N:
        d = dp(index+2, cos+abs(H[index]-H[index+2]))



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

cost = []

dp(0, 0)

print(min(cost))



### FIXED CODE ###

#!/usr/bin/env python3



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

dp = [float('inf') for i in range(N+1)]

dp[1] = 0
dp[2] = abs(H[1]-H[0])
for i in range(3, N+1):
    dp[i] = min(dp[i-1]+abs(H[i-1]-H[i-2]), dp[i-2]+abs(H[i-1]-H[i-3]))

print(dp[N])
N, M = [int(x) for x in input().split(" ")]
S = input()
T = input()

N = len(S)
M = len(T)


def gcd(a, b):
    if (a < b):
        return gcd(b, a)
    if a % b == 0:
        return b
    else:
        return gcd(b, a % b)


def maxkobai(a, b):
    return a * b // gcd(a, b)


#print(gcd(N, M))
#print(maxkobai(N, M))


L = maxkobai(N, M)
ret = L
#x = ['-' for i in range(L+1)]
x = ['-'] * (L+1)

for n in range(0, N):
    x[n * (L//N) + 1] = S[n]

# print(x)

for m in range(0, M):
    idx = m * (L // M) + 1
    x_idx = x[idx]
    if x_idx != '-' and x_idx != T[m]:
        ret = -1
        break

print(ret)


### FIXED CODE ###

N, M = [int(x) for x in input().split(" ")]
S = input()
T = input()

N = len(S)
M = len(T)


S = [ord(c) for c in S]
T = [ord(c) for c in T]


def gcd(a, b):
    if a < b:
        a, b = b, a
    while b:
        a, b = b, a % b
    return a


def maxkobai(a, b):
    return a * b // gcd(a, b)


L = maxkobai(N, M)
ret = L
x = dict()

for n in range(0, N):
    x[n * (L//N) + 1] = S[n]


for m in range(0, M):
    idx = m * (L // M) + 1
    tmp = x.get(idx, 0)

    if tmp != T[m] and tmp != 0:
        ret = -1
        break

print(ret)
input();s=input();t=input();print(2*len(s)-max([i for i in range(n+1)if s[-i:]==t[:i]]or[0]))

### FIXED CODE ###

n=int(input())
s=input()
t=input()
l=0
m=max([i for i in range(n+1)if s[-i:]==t[:i]]or[0])
print(2*n-m)
a,b=map(int,input(),split())
if a<=b*2:
  print(0)
else:
  print((a-b*2)*0.5)

### FIXED CODE ###

a,b=map(int,input().split())
if b*2<=a:
  print(a-b*2)
else:
  print(0)
99592 10342 29105 78532 83018 11639 92015 77204 30914 21912 34519 80835 100000 1

### FIXED CODE ###

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

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

if half1 == half2:
    print(0)
else:
    print(half2-half1)
s, w = map(int, input().split())
if ( w >= s )
	print("unsafe")
else
	print("safe")

### FIXED CODE ###

s, w = map(int, input().split())
if ( w >= s ):
    print("unsafe")
else:
    print("safe")
p = 50
while 1:
	n = input()
	if n == 0: break
	xy = sorted([map(int,raw_input().split()) for i in range(n)])
	x1,y1 = xy[0]
	xy = sorted(xy, key = lambda XY:(XY[0]-x1)**2 + (XY[1]-y11)**2)
	ans = 0
	for j in range(n-3,0,-1):
		x2,y2 = xy[j]
		dx,dy = x2-x1,y2-y1
		if [x1-dy,y1-dx] in xy[j+1:j+p] and [x2+dy,y2-dx] in xy[j+1:j+p]:
			ans = dx**2+dy**2
		if [x1-dy,y1+dx] in xy[j+1:j+p] and [x2-dy,y2+dx] in xy[j+1:j+p]:
			ans = dx**2+dy**2
		if ans: break
	print ans

### FIXED CODE ###

while 1:
	n = input()
	if n == 0: break
	xy = [map(int,raw_input().split()) for i in range(n)]
	S = set(map(tuple,xy))
	ans = 0
	for i in range(n-1):
		x1,y1 = xy[i]
		for j in range(i+1,n):
			x2,y2 = xy[j]
			a = (x2-y2+y1,y2+x2-x1)
			b = (x1-y2+y1,y1+x2-x1)
			if a in S and b in S:
				ans = max(ans,(x1-x2)**2 + (y1-y2)**2)
	print ans
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

n=int(input())

def eratosthenes(lim):
  is_p=[2]*lim

  is_p[0]=0
  is_p[1]=1

  for i in range(2,lim):
    for j in range(i*2,lim,i):
      is_p[j] += 1

  return is_p

lim=n+1
is_p=eratosthenes(lim)

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

### FIXED CODE ###

from bisect import bisect_right

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

a_ac=[0]
for i in range(1,n+1):
  a_ac.append(a_ac[i-1]+a[i-1])

b_ac=[0]
for i in range(1,m+1):
  b_ac.append(b_ac[i-1]+b[i-1])

#print(a_ac)
#print(b_ac)

ans=0
for i in range(n+1):
  remain=k-a_ac[i]
  if remain<0:
    continue
  t_ans=i
  t_ans+=bisect_right(b_ac,remain)-1
  ans=max(ans,t_ans)

print(ans)
data = input().split() # "1 2 3"と入力
 
if data[1]) = "+":
    print int(data[0] + data[2])
else
    print int(data[0] - data[2])

### FIXED CODE ###

data = input().split()

if data[1] in "+":
    print(int(data[0]) + int(data[2]))
else:
    print(int(data[0]) - int(data[2]))