Harryxun/stf_run huggingface dataset:
import math

# one = 1000000000000001
dict={1:"a",2:"b",3:"c",4:"d",5:"e",6:"f",7:"g",8:"h",9:"i",10:"j",
        11:"k",12:"l",13:"m",14:"n",15:"o",16:"p",17:"q",18:"r",19:"s",20:"t",
        21:"u",22:"v",23:"w",24:"x",25:"y",26:"z"}

n=int(input())

if n==1:
    print("a")
    exit()

keta= math.floor(math.log(n-1,26))

ans=[]
for i in range(keta+1):

    if i==0:
        ans.append(dict[((n-1)//26**i)%26+1])
    else:
        ans.append(dict[((n-1)//26**i)%26])

for str in ans[::-1]:
    print(str,end="")


### FIXED CODE ###

import math

# one = 1000000000000001
dict={1:"a",2:"b",3:"c",4:"d",5:"e",6:"f",7:"g",8:"h",9:"i",10:"j",
        11:"k",12:"l",13:"m",14:"n",15:"o",16:"p",17:"q",18:"r",19:"s",20:"t",
        21:"u",22:"v",23:"w",24:"x",25:"y",26:"z"}

n=int(input())

ans = str(dict[(n-1)%26+1])

n=(n-1)//26
while n:
    ans = str(dict[(n-1)%26+1]) + ans
    n=(n-1)//26

print(ans)
import itertools
X, Y=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
MOD = 10**9 + 7
if (X+Y)%3 != 0:
    print(0)
else:

    n = int((2*Y-X)/3)
    m = int((2*X-Y)/3)

    # print(f"n:{n}, m:{m}")

    if n<0 or m<0:
        print(0)
    else:
        for i in range(m):
            ret = ret * (n - i) % MOD * pow(i + 1, MOD-2, MOD) % MOD
        print(ret)

### FIXED CODE ###

import itertools
X, Y=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
MOD = 10**9 + 7
if (X+Y)%3 != 0:
    print(0)
else:

    n = int((2*Y-X)/3)
    m = int((2*X-Y)/3)

    # print(f"n:{n}, m:{m}")

    if n<0 or m<0:
        print(0)
    else:
        ret = 1
        for i in range(m):
            ret = ret * ((X+Y)//3 - i) % MOD * pow(i + 1, MOD-2, MOD) % MOD
        print(ret)
def is_upper_case(s):
  return not (ord('a') <= ord(s) <= ord('z'))

S = input()

if S[0] != 'A':
  print("WA")
  exit()

if S[2:-1].count('C') != 1:
  print("WA")
  exit()

upper_num = map(is_upper_case, S).count(True)

if upper_num != 2: # expected only 'A', 'C'
  print("WA")
  exit()

print("AC")


### FIXED CODE ###

def isNotLower(s):
  return not (ord('a') <= ord(s) <= ord('z'))

S = input()

if S[0] != 'A':
  print("WA")
  exit()

if S[2:-1].count('C') != 1:
  print("WA")
  exit()

upper_limit = 2 # only 'A', 'C'
for s in S:
  if isNotLower(s):
    upper_limit -= 1

  if upper_limit < 0:
    print("WA")
    exit()

print("AC")
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
a = int(input())
if n-(int)(n/500)*500 <= a:
  print('Yes')
else
  print('No')

### FIXED CODE ###

# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
a = int(input())
if n-(int)(n/500)*500 <= a:
  print('Yes')
else:
  print('No')
import sys

class TailRecurseException:
	def __init__(self, args, kwargs):
		self.args = args
		self.kwargs = kwargs

def tail_call_optimized(g):
	def func(*args, **kwargs):
		f = sys._getframe()
		if f.f_back and f.f_back.f_back and f.f_back.f_back.f_code == f.f_code:
			raise TailRecurseException(args, kwargs)
		else:
			while 1:
				try:
					return g(*args, **kwargs)
				except TailRecurseException, e:
					args = e.args
					kwargs = e.kwargs
	func.__doc__ = g.__doc__
	return func

n,m=map(int,raw_input().split())
vis,ci,cb,cc=[0]*(n+1),0,0,0
g=[[] for i in range(n+1)]
def dfs(x,col):
	if vis[x]:
		return vis[x]==col
	vis[x],flag=col,True
	for i in g[x]:
		flag&=dfs(i,3-col)
	return flag
for i in range(m):
	u,v=map(int,raw_input().split())
	g[u]+=[v]
	g[v]+=[u]
for i in range(1,n+1):
	if vis[i]==0:
		if len(g[i])==0:
			ci+=1
		else:
			if dfs(i,1):
				cb+=1
			else:
				cc+=1
print ci*ci+2*ci*(n-ci)+cc*cc+2*cb*cc+2*cb*cb

### FIXED CODE ###

import queue
n,m=map(int,input().split())
vis,ci,cb,cc=[0]*(n+1),0,0,0
g=[[] for i in range(n+1)]
def dfs(x):
	stk,flag=queue.LifoQueue(),True
	stk.put((x,1))
	while not stk.empty():
		u,col=stk.get()
		if vis[u]:
			flag&=(vis[u]==col)
			continue
		vis[u]=col
		for i in g[u]:
			stk.put((i,3-col))
	return flag
for i in range(m):
	u,v=map(int,input().split())
	g[u]+=[v]
	g[v]+=[u]
for i in range(1,n+1):
	if vis[i]==0:
		if len(g[i])==0:
			ci+=1
		else:
			if dfs(i):
				cb+=1
			else:
				cc+=1
print(ci*ci+2*ci*(n-ci)+cc*cc+2*cb*cc+2*cb*cb)
def cin():  return list(map(int,input().split()))

def d2_add(a):
    w = len(a[0])
    h = len(a)
    da = [[0] * w for j in range(h)]
    da[0][0] = a[0][0]
    for i in range(1, w):
        da[0][i] = da[0][i - 1] + a[0][i]
    for i in range(1, h):
        cnt_w = 0
        for j in range(w):
            cnt_w += a[i][j]
            da[i][j] = da[i - 1][j] + cnt_w
    return da

def d2_calc(da, p, q, x, y):
    if p > x or q > y:  return 0
    if p == 0 and q == 0:  return da[x][y]
    if p == 0:  return da[x][y] - da[x][q - 1]
    if q == 0:  return da[x][y] - da[p - 1][y]
    return da[x][y] - da[p - 1][y] - da[x][q - 1] + da[p - 1][q - 1]

N, M, Q = cin()
v = [[0 for _ in range(N)] for _ in range(N)]
p = [[0 for _ in range(2)] for _ in range(N)]

for i in range(M):
    a, b = cin()
    v[a - 1][b - 1] += 1;

for i in range(Q):
    a, b = cin()
    p[i][0] = a - 1;
    p[i][1] = b - 1;

res = d2_add(v);

for i in range(Q):
    ans = d2_calc(res, p[i][0], p[i][0], p[i][1], p[i][1]);
    print(ans)

### FIXED CODE ###

N, M, Q = list(map(int,input().split()))
L = []
R = []
for i in range(M):
    in1, in2 = map(int,input().split())
    L.append(in1 - 1)
    R.append(in2 - 1)
p = []
q = []
for i in range(Q):
    in1, in2 = map(int,input().split())
    p.append(in1 - 1)
    q.append(in2 - 1)
    
a = [[0 for _ in range(N)] for _ in range(N)]
for i in range(M):
    a[L[i]][R[i]] += 1
    
#da[i][j]:(0,0)~(i,j)の長方形の和
def da_gen(a):
    w = len(a[0])
    h = len(a)
    da = [[0] * w for j in range(h)]
    da[0][0] = a[0][0]
    for i in range(1, w):
        da[0][i] = da[0][i - 1] + a[0][i]
    for i in range(1,h):
        cnt_w = 0
        for j in range(w):
            cnt_w += a[i][j]
            da[i][j] = da[i - 1][j] + cnt_w
    return da

#da_calc(p,q,x,y):(p,q)~(x,y)の長方形の和
def da_calc(da, p, q, x, y):
    if p > x or q > y:
        return 0
    if p == 0 and q == 0:
        return da[x][y]
    if p == 0:
        return da[x][y] - da[x][q - 1]
    if q == 0:
        return da[x][y] - da[p - 1][y]
    return da[x][y] - da[p - 1][y] - da[x][q - 1]+da[p - 1][q - 1]

ret = da_gen(a)
for i in range(Q):
    ans = da_calc(ret, p[i], p[i], q[i], q[i])
    print(ans)
n=int(inpout())
if n%2==0:
  print(0.5)
else:
  print((n+1)/(2*n))


### FIXED CODE ###

n=int(input())
if n%2==0:
  print(0.5)
else:
  print((n+1)/(2*n))
N = int(input())
a = set()
for i in range(N):
  set.add(int(input()))
print(len(a))

### FIXED CODE ###

N = int(input())
a = set()
for i in range(N):
  a.add(int(input()))
print(len(a))
N,K=map(int,input().split())
S=str(input())
print(S.replace(S[K-1],S[K-1].lower())
      

### FIXED CODE ###

N,K=map(int,input().split())
S=list(input())
S[K-1]=S[K-1].lower()
print(''.join(S))
a, b = map(int, input().split())
print(max[a*b, a-b, a+b])

### FIXED CODE ###

a, b = map(int, input().split())
print(max([a*b, a-b, a+b]))
int(i) for i in input().split()]

matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])

vector = []
for mi in range(m):
    vector.append(int(input()))

b = []
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]

    print(sum)

### FIXED CODE ###


n, m = [int(i) for i in input().split()]
 
matrix = []
for ni in range(n):
    matrix.append([int(a) for a in input().split()])
 
vector = []
for mi in range(m):
    vector.append(int(input()))
 
for ni in range(n):
    sum = 0
    for mi in range(m):
        sum += matrix[ni][mi] * vector[mi]
 
    print(sum)
class Stack:
    MAX = 101

    def __init__(self):
        self.S = [None] * self.__class__.MAX
        self.top = 0

    def is_empty(self):
        return self.top == 0

    def is_full(self):
        return self.top >= self.__class__.MAX - 1

    def push(self, x):
        self.top += 1
        self.S[self.top] = x

    def pop(self):
        self.top -= 1
        return self.S[self.top + 1]


arr = [str(s) for s in input().split()]
stack = Stack()
stack.push(eval("".join(map(str, [stack.pop(), s, stack.pop()][::-1]))))
    if s in["+", "-", "*"] else stack.push(int(s)) for s in arr
print(stack.pop())



### FIXED CODE ###

class Stack:
    MAX = 101

    def __init__(self):
        self.S = [None] * self.__class__.MAX
        self.top = 0

    def is_empty(self):
        return self.top == 0

    def is_full(self):
        return self.top >= self.__class__.MAX - 1

    def push(self, x):
        self.top += 1
        self.S[self.top] = x
        return x

    def pop(self):
        self.top -= 1
        return self.S[self.top + 1]


stack = Stack()
print([stack.push(eval("".join(map(str,[stack.pop(),s,stack.pop()][::-1]))))
       if s in["+","-","*"]else stack.push(int(s))for s in input().split()][-1])
l = raw_input().split()
N = l[0]
i = l[1]
print(N + 1 - i)


### FIXED CODE ###

l = input().split()
N = int(l[0])
i = int(l[1])
print(N + 1 - i)
#入力
a=input()
b=input()
#選別
print(6-a-b)

    




### FIXED CODE ###

a=int(input())
b=int(input())

print(6-a-b)
import numpy as np
import math
import collections
import bisect
#import sympy


def divisor(n):
    i = 1
    lower_divisors, upper_divisors = [], []
    while(i * i <= n):
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n // i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


N = int(input())

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

A.sort()

ans = 0
ans = N
Set = set()
for i in range(N):
    divs = divisor(A[i])
    # print(divs)
    if i != 0:
        Set.add(A[i - 1])
    if i < N - 1:
        if A[i] == A[i + 1]:
            ans -= 1
            continue

    for d in divs:
        if i != 0:
            if d in Set:
                ans -= 1
                break
print(ans)


### FIXED CODE ###

import numpy as np
import math
import collections
import bisect
from collections import Counter


N = int(input())

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

A.sort()
Set = set()

Amax = A[len(A) - 1]

counter = Counter(A)
ans = 0
for a in A:
    if a in Set:
        continue
    x = a
    while(x <= Amax):
        Set.add(x)
        x += a

    if counter[a] == 1:
        ans += 1

print(ans)
n = str(input())
s = len(n)
if s == 1:
     print(n)
elif s == 2:
     print(9)
elif s == 3:
     print(9 + int(n) - 99)
elif s == 4:
     print(9 + 900)
elif s == 5:
     print(909 + n - 9000)
else:
     print(90909)

### FIXED CODE ###


n = str(input())
s = len(n)
if s == 1:
     print(n)
elif s == 2:
     print(9)
elif s == 3:
     print(9 + int(n) - 99)
elif s == 4:
     print(9 + 900)
elif s == 5:
     print(909 + int(n) - 9999)
else:
     print(90909)
n = input()
if n.count(7) == 0:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

n = input()
if n.count("7") == 0:
    print("No")
else:
    print("Yes")
l,r,d=map(int,input().split())
aa=//d
bb=(l-1)//d
print(aa-bb)


### FIXED CODE ###

l,r,d=map(int,input().split())
aa=r//d
bb=(l-1)//d
print(aa-bb)
n = int(input())
if n%2 == 0:
  print(n,n,n//2)
else:
  for h in range(2,3501):
    for l in range(2,3501):
      w =  n*h*l // (4*h*l - n*(h+l))
      if 4*h*l*w == n*(h*w+h*l+l*w):
        print(h,l,w)
        break

### FIXED CODE ###

from itertools import product
n = int(input())
if n%2 == 0:
  print(n,n,n//2)
else:
  for h,l in product(range(max(2, n//4),3501),repeat=2):
    m = n*h*l
    c = 4*h*l - n*(h+l)
    if c > 0 and m%c == 0:
      w = m//c
      break
  print(h,l,w)
a = int(input())
x = list(map(int,input().split()))
t = range(1,a+1)
A = []
B = []
for i in range(1,a+1):
    A.append(30000*i)
    B.append(30000*(a-i+1))
for i ,d in enumerate(x):
    A[d-1] -= a-i
print(*A)
print(*B)


### FIXED CODE ###

a = int(input())
x = list(map(int,input().split()))
t = range(1,a+1)
A = []
B = []
for i in range(1,a+1):
    A.append(30000*i)
    B.append(30000*(a-i+1))
for i ,d in enumerate(x):
    A[d-1] -= a-i
print(*A)
print(*B)
X = int(input())
if X == 1:
    print(1)
else:
    maxa = 0
    for i in range(2,32):
        for j in range(2,11):
            if i**j <= X:
                maxa = max(maxa,i**j)
print(maxa)

### FIXED CODE ###

X = int(input())
if X == 1:
    print(1)
else:
    maxa = 0
    for i in range(2,32):
        for j in range(2,11):
            if i**j <= X:
                maxa = max(maxa,i**j)
    print(maxa)
# coding: utf-8
import sys,pprint, math
from fractions import Fraction
from collections import defaultdict

MOD = 1000000007
N = int(input())
params =[]
hatemasks = []
tilts = defaultdict(lambda: [0,0])
zerozero = 0
zerodiv = 0
for i in range(N):
    (ai, bi) = map(int,input().split())
    if ai == 0 and bi == 0:
        zerozero += 1
        continue
    elif (ai <= 0) or (ai == 0 and bi < 0):
        ai *= -1
        bi *= -1
    g = math.gcd(ai,bi)
    ai = ai // g
    bi = bi // g
    if bi > 0:
        tilts[(ai,bi)][0] += 1
    else:
        tilts[(-bi,ai)][1] += 1
print(tilts,file=sys.stderr)

#sys.exit()
ans = 1
for(v1,v2) in tilts.values():
    ans *= 1 +pow(2,v1,MOD)-1 +pow(2,v2,MOD)-1
    ans %= MOD
ans = (ans+zerozero-1) % MOD
print(ans)

### FIXED CODE ###

# coding: utf-8
import sys,pprint

N = int(input())
h = 'hon'
p = 'pon'
b = 'bon'
suffix = [p,p,h,b,h,h,p,h,p,h]

print(suffix[N%10])
n,k = map(int,input().split())
x=list(map(int,input().split()))
y=[]
x.sort()
for i in range(1,k):
    y.append(x[i]-x[i-1])
y.sort()
for k in range(n-1):
    y.pop()
print(sum(y))

### FIXED CODE ###

n,k = map(int,input().split())
x=list(map(int,input().split()))
y=[]
x.sort()
for i in range(1,k):
    y.append(x[i]-x[i-1])
y.sort()
if n>k-1:
    print(0)
else:
    for k in range(n-1):
        y.pop()
    print(sum(y))
for i in range():
    inpu = int(input())
    if inpu == 0:
        break
    else:
        print("Case %d: %d" % (i, inpu))


### FIXED CODE ###

for i in range(1, 10001):
    inpu = int(input())
    if inpu == 0:
        break
    else:
        print("Case %d: %d" % (i, inpu))
n,k = map(int,input().split())
s = input()


if s[0] == '1':
    length_01 = [0]
else:
    length_01 = [0,0]

for i in range(n-1):
    if s[i] != s[i+1]:
        length_01.append(i+1)

if s[n-1] == '0':
    length_01.append(n-1)

num_0 = int((len(length_01)+1)/2)
if num_0 - 1 >= k:
    answer = 0
    for i in range(num_0):
        if answer < length_01[2*(i+k)] - length_01[2*i] + 1:
            answer = length_01[2*(i+k)] - length_01[2*i] + 1
else:
    answer = n

print(answer)


### FIXED CODE ###

n,k = map(int,input().split())
s = input()

if s[0] == '1':
    length_01 = [0]
else:
    length_01 = [0,0]

for i in range(n-1):
    if s[i] != s[i+1]:
        length_01.append(i+1)

if s[n-1] == '1':
    length_01.append(n)
else:
    length_01.append(n)
    length_01.append(n)

num_0 = int(len(length_01)/2)
if num_0 - k >= 1:
    answer = 0
    for i in range(num_0 - k):
        if answer < length_01[2*(i+k)+1] - length_01[2*i]:
            answer = length_01[2*(i+k)+1] - length_01[2*i]
else:
    answer = n

print(answer)
a,b,c,d = input()
ls = ["+","+","+"]
p = 0
for i in range(3**2):
    for j in range(len(ls)):
        if (i >> n) & 1:
            ls[j] = "-"
    if (eval(a+ls[0]+b+ls[1]+c+ls[2]+d)) == 7:
        print(a+ls[0]+b+ls[1]+c+ls[2]+d+"=7")
        break
        

### FIXED CODE ###

import sys
s = (input())
a = int(s[0])
b = int(s[1])
c = int(s[2])
d = int(s[3])
ls = ["+","-"]
ans = a+b+c+d
if ans == 7:
    print(str(a)+"+"+str(b)+"+"+str(c)+"+"+str(d)+"=7")
    sys.exit()
ans = a+b+c-d
if ans == 7:
    print(str(a)+"+"+str(b)+"+"+str(c)+"-"+str(d)+"=7")
    sys.exit()
ans = a+b-c+d
if ans == 7:
    print(str(a)+"+"+str(b)+"-"+str(c)+"+"+str(d)+"=7")
    sys.exit()
ans = a-b+c+d
if ans == 7:
    print(str(a)+"-"+str(b)+"+"+str(c)+"+"+str(d)+"=7")
    sys.exit()
ans = a-b-c+d
if ans == 7:
    print(str(a)+"-"+str(b)+"-"+str(c)+"+"+str(d)+"=7")
    sys.exit()
ans = a+b-c-d
if ans == 7:
    print(str(a)+"+"+str(b)+"-"+str(c)+"-"+str(d)+"=7")
    sys.exit()
ans = a-b+c-d
if ans == 7:
    print(str(a)+"-"+str(b)+"+"+str(c)+"-"+str(d)+"=7")
    sys.exit()
ans = a-b-c-d
if ans == 7:
    print(str(a)+"-"+str(b)+"-"+str(c)+"-"+str(d)+"=7")
    sys.exit()
n,k=map(int,input().split())
S=input()

now=S[0]
cnt=1
A=[] #個数配列
for i in range(n-1):
    if S[i+1]==now:
        cnt+=1
    else:
        A.append(cnt)
        cnt=1
        now=S[i+1]
if cnt>0:
    A.append(cnt)
l=len(A)
    
if S[0]=="0":
    if l<=2*k:
        ans=n
    elif 2*k+1<=l<=2*k+2:
        ans=max(sum(A[:2*k]),sum(A[1:]))
    else:
        ans=max(sum(A[:2*k]),sum(A[1:2*k+2]))
        cnt=ans
        for i in range((l-2*k-2)//2):
            cnt-=A[2*i+2]+A[2*i+3]
            cnt+=A[2*k+2*i+2]+A[2*k+2*i+3]
            ans=max(cnt,ans)
        if l%2!=0:
            ans=max(A[l-2*k:],ans)
else:
    if l<=2*k+1:
        ans=n
    else:
        ans=sum(A[:2*k+1])
        cnt=ans
        for i in range((l-2*k-1)//2):
            cnt-=A[2*i]+A[2*i+1]
            cnt+=A[2*k+2*i+1]+A[2*k+2*i+2]
            ans=max(cnt,ans)
        if l%2!=1:
            ans=max(A[l-2*k-1:],ans)
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
S=input()

now=S[0]
cnt=1
A=[] #個数配列
for i in range(n-1):
    if S[i+1]==now:
        cnt+=1
    else:
        A.append(cnt)
        cnt=1
        now=S[i+1]
if cnt>0:
    A.append(cnt)
l=len(A)
    
if S[0]=="0":
    if l<=2*k:
        ans=n
    elif 2*k+1<=l<=2*k+2:
        ans=max(sum(A[:2*k]),sum(A[1:]))
    else:
        ans=max(sum(A[:2*k]),sum(A[1:2*k+2]))
        cnt=sum(A[1:2*k+2])
        for i in range((l-2*k-2)//2):
            cnt-=A[2*i+1]+A[2*i+2]
            cnt+=A[2*k+2*i+2]+A[2*k+2*i+3]
            ans=max(cnt,ans)
        if l%2!=0:
            ans=max(sum(A[l-2*k:]),ans)
else:
    if l<=2*k+1:
        ans=n
    else:
        ans=sum(A[:2*k+1])
        cnt=ans
        for i in range((l-2*k-1)//2):
            cnt-=A[2*i]+A[2*i+1]
            cnt+=A[2*k+2*i+1]+A[2*k+2*i+2]
            ans=max(cnt,ans)
        if l%2==0:
            ans=max(sum(A[l-2*k:]),ans)
print(ans)
from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    cList = []
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    for i,j in enumerate(S[1:-2]):
        if j=='C':
            cList=S.pop(i+1)
    if len(cList)==1:
        flag1=True
    
    if ''.join(S).islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('AC')
    else:
        print('WA')


    
if __name__== "__main__":
    main() 











### FIXED CODE ###

from collections import Counter

def main():

    S = list(input())
    head = S.pop(0)
    cList = []
    flag  = False
    flag1 = False
    flag2 = False

    if head == 'A':
        flag = True
    
    for i,j in enumerate(S[1:-1]):
        if j=='C':
            cList.append(i+1)
    if len(cList)==1:
        flag1=True
        S.pop(cList[0])
        
    if ''.join(S).islower():
        flag2 = True
    
    if flag and flag1 and flag2:
        print('AC')
    else:
        print('WA')


    
if __name__== "__main__":
    main()
import itertools
import math
n, a, b, k = map(int, input().split())
count = 0
for i in range(math.floor(n/a)):
    if (n - (i * a)) % b == 0:
        count += (itertools.combinations(n, i) * itertools.combinations(n, (n-i*a)/b))
print(count%998244353)

### FIXED CODE ###

N,A,B,K = map(int,input().split())
sprime = 998244353 # approx 10**9
A,B = sorted((A,B))
if (A+B) * N < K:
	print(0)
	exit()
 
def egcd(a, b):
    if a == 0:
        return (b, 0, 1)
    else:
        g, y, x = egcd(b % a, a)
        return (g, x - (b // a) * y, y)
 
def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception('modular inverse does not exist')
    else:
        return x % m
 
memo = [0] * (N+1)
memo[0] = memo[N] = 1
for i in range(1,N//2+1):
	v = memo[i-1] * (N-i+1) * modinv(i,sprime)
	v = v % sprime
	memo[i] = memo[N-i] = v
 
# max is A*N + B*N
sum = 0
for b in range(N+1):
  a = (K-b*B)//A
  if 0 <= a <= N and a*A+b*B == K:
    sum += memo[a]*memo[b]
    sum %= sprime
 
print(sum)
N = 5
Dishes = [int(input()) for _ in range(N)]
Dishes_10 = [0]*N

for i in range(N):
    d = int(str(Dishes[i])[-1])
    if d!=0:
        Dishes_10[i] = Dishes[i]+10-d
    else:
        Dishes_10[i] = Dishes[i]

Max=0
for i in range(N):
    
    if (Dishes_10[i]-Dishes[i])>Max:
        posi = i
        Max = Dishes_10[i]-Dishes[i]
        
Dishes_10[posi] = Dishes[posi]

print(sum(Dishes_10))

### FIXED CODE ###

N = 5
D = [int(input()) for _ in range(N)]

srv_t = 0
last_srv = 0

for d in D:
   if d%10!=0:
       t = 10 - d%10
   else:
       t = 0
    
   srv_t += (d+t)
    
   last_srv = max(last_srv,t)
    
print(srv_t-last_srv)
A,B,T=map(int, float(input()))
print((T+0.5)//A*B)

### FIXED CODE ###

A,B,T=(map(float, input().split())) 
print(int((T+0.5)//A*B))
import numpy as np

n,c = map(int,input().split())

table = np.zeros(10**5+1)
chan = [[] for _ in range(c+2)]

for _ in range(n):
    s,t,c = map(int,input().split())
    chan[c].append([s,t])

# 同チャンネルの連続番組を統合する
times = []
for i in range(c+2):
    arr = chan[i]
    if chan[i]==[] : continue
    for i in range(len(arr)):
        if i == len(arr)-1 : break
        if arr[i][1] == arr[i+1][0]:
            arr[i+1] = [arr[i][0], arr[i+1][1]]
            arr[i] = [1,0]
    times += arr

# いもす法
for s,t in times:
    table[s] += 1
    table[t+1] -= 1

# 累積和の計算
ans = int(table.cumsum().max())

print(ans)



### FIXED CODE ###

import numpy as np

n,c = map(int,input().split())
table = np.zeros(10**5+2, dtype=np.int32)
chs = [[] for _ in range(c+1)]

for _ in range(n):
    s,t,c = map(int,input().split())
    chs[c].append([s,t])

# 同チャンネル内の連続番組を合体
times = []
for ch in chs:
    if not ch: continue
    ch.sort()
    for i in range(len(ch)):
        if i == 0: continue
        if ch[i-1][1] == ch[i][0]:
            ch[i] = [ch[i-1][0], ch[i][1]]
            ch[i-1] = []
    for arr in ch:
        if not arr: continue
        times.append(arr)

# いもす法
for arr in times:
    table[arr[0]] += 1
    table[arr[1]+1] -= 1

# 累積和の最大値
ans = table.cumsum().max()

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

if abs(b-a) <= d:
    if abs(c-b) <= d:
        print('Yes')
    else:
        print('No')
        break
else:
    print('No')

### FIXED CODE ###

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

if abs(b-a) <= d and abs(c-b) <= d:
        print('Yes')
elif abs(a-c) <= d:
    print('Yes')
else:
    print('No')
N=int(input())
X=int(input())
M=list(map(int,input().split()))
sum_M=sum(M)
min_M=min(M)
print((X-sum_M)//min_M+N)       


### FIXED CODE ###

N,X=map(int,input().split())
M=[int(input()) for i in range(N)]
print((X-sum(M))//min(M)+N)
n1 = int(input())
n2 = list(map(int, input().split()))
print(1/((1/n2[0] + 1/n2[1])))

### FIXED CODE ###

n1 = int(input())
n2 = list(map(int, input().split()))
n3 = [1/n2[i] for i in range(len(n2))]
print(1/(sum(n3)))
days = {"SUN:0", "MON:1"," TUE:2", "WED:3", "THU:4","FRI:5","SAT:6"}
week = raw_input()
t = 7 - days[week] 
print(t)

### FIXED CODE ###

days = {"SUN":0, "MON":1,"TUE":2, "WED":3, "THU":4,"FRI":5,"SAT":6}
week = raw_input()
t = 7 - days[week] 
print(t)
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    ans = A
    sum_ = 1

    while True:
        if ans >= B:
            break

        sum_ += 1

        ans = ans - 1 + A

    print(sum_)


if __name__ == "__main__":
    main()
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    ans = A
    sum_ = 1

    while True:
        if ans >= B:
            break

        sum_ += 1

        ans = ans - 1 + A

    print(sum_)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    ans = A
    sum_ = 1

    while True:
        if B == 1:
            sum_ = 0
            break

        if ans >= B:
            break

        sum_ += 1

        ans = ans - 1 + A

    print(sum_)


if __name__ == "__main__":
    main()