Harryxun/stf_run huggingface dataset:
from math import *

cnt = [[0] * 25 for i in range(25)]

ans = 0
for _ in range(int(input())):
    t = float(input())
    b = int(t * 1000000000.0)
    x, y = 0, 0
    while b % 2 == 0:
        x += 1
        b //= 2
    while b % 5 == 0:
        y += 1
        b //= 5
    print(x, y)
    for i in range(25):
        for j in range(25):
            if i + x >= 18 and j + y >= 18:
                ans += cnt[i][j]
    cnt[x][y] += 1
print(ans)


### FIXED CODE ###

from math import *
#import sys 
#cin = sys.stdin()

cnt = [[0] * 20 for i in range(20)]

ans = 0
for _ in range(int(input())):
    t = input().strip().split('.')
    if (len(t) > 1):
        b = int(t[0])*1000000000 + int(t[1]) * 10 ** (9 - len(t[1]))
    else:
        b = int(t[0]) * 1000000000
    x, y = 0, 0
    while (b % 2 == 0) and (x <= 18):
        x += 1
        b //= 2
    while (b % 5 == 0) and (y <= 18):
        y += 1
        b //= 5
    #print(x, y)
    for i in range(20):
        for j in range(20):
            if (i + x >= 18) and (j + y >= 18):
                ans += cnt[i][j]
    cnt[x][y] += 1
print(ans)
N, K = map(int,input().split())
A = list(map(int,input().split()))
X = [-1 for j in range(N)]
X[0] = 0
Y = [0]
i = 0
Num = 0
MM = 0
for k in range(1,N):
  i = A[i]-1
  if k = K:
    MM = 1
    P = i
  elif X[i] != -1:
    Num = X[i]
    break
  else:
    X[i] = k
    Y.append(i)
Y = Y[Num:]
B = (K-Num)%len(Y)
if MM = 1:
  print(P+1)
else:
  print(Y[B]+1)

### FIXED CODE ###

N, K = map(int,input().split())
A = list(map(int,input().split()))
X = [-1 for j in range(N)]
X[0] = 0
Y = [0]
i = 0
Num = 0
MM = 0
for k in range(1,N):
  i = A[i]-1
  if k == K:
    MM = 1
    P = i
    break
  elif X[i] != -1:
    Num = X[i]
    break
  else:
    X[i] = k
    Y.append(i)
Y = Y[Num:]
B = (K-Num)%len(Y)
if MM == 1:
  print(P+1)
else:
  print(Y[B]+1)
I = 0
L = 1
R = 2
P = 3
B = 4
D = 5
H = 6

def getidx(Tree,value):
    idx = -1
    for i in range(len(Tree)):
        if Tree[i][I] == value:
            idx = i
            break
    return idx

def search(Tree, A, B, num):
    """ Tree ??? Tree A???Preorder?????? B???Inorder??????
        ??????????????????????????§??? root ??? index ????????? """
    root = A[0]
    rootidx = getidx(Tree,root)
    ld = num
    for i in range(num):
        if B[i] == root:
            ld = i
            break
    if ld > 0:
        left,lidx = search(Tree,A[1:ld+1],B[:ld],ld)
        Tree[rootidx][L] = lidx
    rt = ld + 1
    if rt < num:
        right,ridx = search(Tree,A[rt:],B[rt:],num - rt)
        Tree[rootidx][R] = ridx
    return (root,rootidx)

def getroot(Tree, nidx):
    pidx = Tree[nidx][P]
    if pidx < 0:
        return nidx
    return getroot(Tree,pidx)

ef postorder(Tree, nidx, A):
    if nidx < 0:
        return
    postorder(Tree,Tree[nidx][L],A)
    postorder(Tree,Tree[nidx][R],A)
    A.append(Tree[nidx][I])


def main():

    """ ????????? """
    num = int(input().strip())
    plist = list(map(int,input().split()))
    ilist = list(map(int,input().split()))
    tree = []
    for i in plist:
        tree.append([i, -1, -1, -1, -1, 0, 0])

    root,ridx = search(tree, plist, ilist, num)

    pos = []

    postorder(tree, ridx, pos)
    print(" ".join(map(str,pos)))

if __name__ == '__main__':
    main()

### FIXED CODE ###

I = 0
L = 1
R = 2
P = 3
B = 4
D = 5
H = 6

def getidx(Tree,value):
    idx = -1
    for i in range(len(Tree)):
        if Tree[i][I] == value:
            idx = i
            break
    return idx

def search(Tree, A, B, num):
    root = A[0]
    rootidx = getidx(Tree,root)
    ld = num
    for i in range(num):
        if B[i] == root:
            ld = i
            break
    if ld > 0:
        left,lidx = search(Tree,A[1:ld+1],B[:ld],ld)
        Tree[rootidx][L] = lidx
    rt = ld + 1
    if rt < num:
        right,ridx = search(Tree,A[rt:],B[rt:],num - rt)
        Tree[rootidx][R] = ridx
    return (root,rootidx)

def postorder(Tree, nidx, A):
    if nidx < 0:
        return
    postorder(Tree,Tree[nidx][L],A)
    postorder(Tree,Tree[nidx][R],A)
    A.append(Tree[nidx][I])


def main():

    """ ????????? """
    num = int(input().strip())
    plist = list(map(int,input().split()))
    ilist = list(map(int,input().split()))
    tree = []
    for i in plist:
        tree.append([i, -1, -1, -1, -1, 0, 0])

    root,ridx = search(tree, plist, ilist, num)

    pos = []

    postorder(tree, ridx, pos)
    print(" ".join(map(str,pos)))

if __name__ == '__main__':
    main()
a,b = map(int,input().split())
if a>b:
  print(str(b)*a)a,b = map(int,input().split())
if a>b:
  print(str(b)*a)
else:
  print(str(a)*b)

### FIXED CODE ###

a,b = map(int,input().split())
if a>b:
  print(str(b)*a)
else:
  print(str(a)*b)
# coding: utf-8


if __name__ == '__main__':
  x = input()

  print(x ** 3 + '\n')

### FIXED CODE ###

x = int(input())
print(x ** 3)
a,b,c,d=map(int,(input().split())
x,y=0,0
if a>b:
    x=a
else:
    x=b
if c>d:
    y=c
else:
    y=d
print(x*y)

### FIXED CODE ###

a,b,c,d=map(int,input().split())
'''
if a>b:
  x=a
else:
  x=b
if c>d:
  y=c
else:
  y=d
print(x*y)
'''
print(max(a*c,a*d,b*c,b*d))
n=int(input())
a=list(map(int,input().split()))
for i in range(n):
	a[i]//=400
free=0
b=set()
for i in range(n):
	if a[i]>=8:
		free+=1
	else:
		b.add(a[i])
cnt=len(b)
x=max(cnt,1)
y=min(cnt+free)
print(x,y)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
for i in range(n):
	a[i]//=400
free=0
b=set()
for i in range(n):
	if a[i]>=8:
		free+=1
	else:
		b.add(a[i])
cnt=len(b)
x=max(cnt,1)
y=(cnt+free)
print(x,y)
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
l = sorted(list(zip(b, a)))
 
a.sort()
b.sort()
for i in range(n):
  if a[i] > b[i]:
    print('No')
    exit()
    
fir, las = {}, {}
s = [0] * n
for i in range(n):
  fir[a[i]] = min(fir.get(a[i], n), i)
  las[a[i]] = max(las.get(a[i], 0), i)
  if i > 0 and a[i] <= b[i - 1]:
    s[i] = 1
for i in range(1, n):
  s[i] += s[i - 1]
 
for i, (x, y) in enumerate(l):
  if x >= y:
    if y >= a[i] or s[fir[x]] - s[las[y]] == fir[x] - las[y]:
      print('Yes')
      exit()
 
print('No')


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
l = list(zip(b, a))
 
a.sort()
b.sort()
for i in range(n):
  if a[i] > b[i]:
    print('No')
    exit()

ptr, pos = {}, {}
for i in range(n):
  if i > 0 and a[i] <= b[i - 1]:
    print('Yes')
    exit()
  ptr[l[i][1]] = l[i][0]
  pos[b[i]] = i

sta, now, cnt = a[0], a[0], 1
while True:
  now = a[pos[ptr[now]]]
  if now == sta:
    break
  cnt += 1
if cnt == n:
  print('No')
else:
  print('Yes')
n = int(input())
A = [0]*10000
 
for x in range(1,101):
    for y in range(1,101):
        for z in range(1,101):
            a = x**2+y**2+z**2+x*y+y*z+z*x
            if a <10000:
                A[a] += 1
                
for i in range(n):
    print(A[i+1])
        


### FIXED CODE ###

n = int(input())
A = [0]*10050
 
for x in range(1,105):
    for y in range(1,105):
        for z in range(1,105):
            a = x**2+y**2+z**2+x*y+y*z+z*x
            if a <10050:
                A[a] += 1
                
for i in range(n):
    print(A[i+1])
if A1+A2+A3 >= 22:
  print("bust")
else:
  print("win")

### FIXED CODE ###

import sys
A1, A2, A3 = input().split(" ")
A1 = int(A1)
A2 = int(A2)
A3 = int(A3)
if A1+A2+A3 >= 22:
  print("bust")
else:
  print("win")
#素因数分解
def soinsu_bunkai(m):
    pf={}

    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:
        pf[m]=1
    return pf

# 組み合わせの総数 p=10**9+7 で割ったあまりを求める Satoooh Blog 2020/02/27 4分 
"""n<10**7 , p は素数"""
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



# 初期入力
from collections import Counter
import sys
input = sys.stdin.readline  #文字列では使わない
mod =10**9 +7
p =mod
N,M = map(int, input().split())
a =soinsu_bunkai(M)
ans =1

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

#mod p における n の逆元の計算
for i in range(2, n + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

for i in a.values():
    x =cmb(N +i -1,i,mod)
    ans *=x
print(ans %mod)

### FIXED CODE ###

#素因数分解
def soinsu_bunkai(m):
    pf={}

    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:
        pf[m]=1
    return pf

# 組み合わせの総数 p=10**9+7 で割ったあまりを求める Satoooh Blog 2020/02/27 4分 
"""n<10**7 , p は素数"""
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



# 初期入力
from collections import Counter
import sys
input = sys.stdin.readline  #文字列では使わない
mod =10**9 +7
p =mod
N,M = map(int, input().split())
a =soinsu_bunkai(M)
ans =1

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

#mod p における n の逆元の計算
for i in range(2, n + 1):
    fact.append((fact[-1] * i) % p)
    inv.append((-inv[p % i] * (p // i)) % p)
    factinv.append((factinv[-1] * inv[-1]) % p)

for i in a.values():
    x =cmb(N +i -1,i,mod)
    ans *=x
print(ans %mod)
a, b, c = map(int, input().split())
print(a if b==c else b if a==c else c if a==b)

### FIXED CODE ###

a, b, c = map(int, input().split())
print(a if b==c else b if a==c else c)
main(int_list):
  sorted_list = sorted(int_list)
  print ???str(sorted_list[0]) + ' ' + str(sorted_list[1]) + ' ' + str(sorted_list[2]) + ' ' ???

int_list = []
input_string = raw_input()
input_list = raw_input().split(' ')
for i in input_list:
  int_list.append(int(i))

main(int_list)

### FIXED CODE ###

a, b, c = sorted(map(int, raw_input().split()))
print a, b, c
#include <stdio.h>
#include <math.h>


using ll = long long;
using llu = long long unsigned;

int main(void)
{
    //scanf("%d", );
    //scanf("%llu", );
    //scanf("%ll", );
    //printf("%d");
    //printf("%lli");
    //printf("%llu");

    llu fives[64000];
    llu x;
    scanf("%llu", &x);
    for (register llu i=0; i<32000; i++)
        fives[i] = i*i*i*i*i;
    for (register llu i=32000; i<64000; i++)
        fives[i] = -i*i*i*i*i;

    bool found = false;
    register llu i,j;
    for (i=0; i<64000; i++) {
        for (j=0; j<64000; i++) {
            if ((fives[i]-fives[j])==x) {
                found = true;
            break;
            }
        }
        if (found) break;
    }
    if (i>32000)
        i*=-1;
    if (j>32000)
        j*=-1;
    printf("%d %d", i, j);

    return 0;
}


### FIXED CODE ###

X = int(input())

for A in range(1000):
    for B in range(-1000, 1000):
        if A ** 5 - B ** 5 == X:
            print(A, B)
            exit()
n,m = map(int,input().split(''))
res = (1900*m+100(n-m))*2**m
print(res)

### FIXED CODE ###

n,m = map(int,input().split())
res = (1900*m+100*(n-m))*(2**m)
print(res)
import collections

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

c = collections.Counter(l)

L = c.most_common()

values, counts = zip(*c.most_common())

A = list(values)
B = list(counts)

b = B.count(B[0])

a = A[0:b + 1]

for i in a[0:]:
print(i)

### FIXED CODE ###

import collections
 
N = int(input())
l = [input() for _ in range(N)]
 
c = collections.Counter(l)
 
L = c.most_common()
 
values, counts = zip(*c.most_common())
 
A = list(values)
B = list(counts)
 
b = B.count(B[0])
 
a = A[0:b]
c = sorted(a)

for i in c[0:]:
		print(i)
dat =list(input().split())

for i in dat:
	i = int(i)

dat.sort()
dat.reverse()

asum = 0
bsum = 0

for num in range(len(dat)):
#	if i%2==0:
#		asum = asum + dat[i]
#	else:
#		bsum = bsum + dat[i]
		
print(asum-bsum)

### FIXED CODE ###

n = int(input())
dat = list(input().split())

dat = list(map(int,dat))

dat.sort(reverse=True)

asum = 0
bsum = 0

for i in range(n):
	if i % 2 == 0:
		asum = asum + dat[i]
	else:
		bsum = bsum + dat[i]
		
print(asum-bsum)
# C - Subarray Sum
n,k,s=map(int,input().split())
a=k*s+(n-k)*(s+1)
print(*a)

### FIXED CODE ###

# C - Subarray Sum
n,k,s=map(int,input().split())
a=[]
a+=[s]*k
if s!=10**9:
    a+=[s+1]*(n-k)
else:
    a+=[1]*(n-k)
print(*a)
from collections import Counter
n = int(input())
s = Counter(int)
for _ in n:
    word = str(input())
    s[word] += 1
m = int(input())
for _ in m:
    word = str(input())
    if word in s.keys():
        s[word] -= 1
print(s.most_common(1)[1])
    

### FIXED CODE ###

from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))
a=int(input())
if a<1200:
	print("ABC")
else if a<2800:
	print("ARC")
else:
  print("AGC")

### FIXED CODE ###

a=int(input())
if a<1200:
	print("ABC")
elif a<2800:
	print("ARC")
else:
	print("AGC")
A, B = map(lambda S: int(S,16), input().split())
if A < B:
  print("<")
elif A = B:
  print("=")
else:
  print(">")


### FIXED CODE ###

A, B = map(lambda S: int(S,16), input().split())
if A < B:
  print("<")
elif A == B:
  print("=")
else:
  print(">")
import sys

def main():
    arg = sys.argv[1:]
    if arg[1] == "+":
        return int(arg[0]) + int(arg[2])
    elif arg[1] == "-":
        return int(arg[0]) - int(arg[2])
    else:
        return 0

print main()


### FIXED CODE ###

import sys

def main():
    arg = raw_input().split(" ")
    a = int(arg[0])
    b = int(arg[2])
    op = arg[1]
    if a < 1 or b > 10 **9:
        return 0

    if op == "+":
        return a + b
    elif op == "-":
        return a - b
    else:
        return 0

print main()
if __name__ == "__main__":
    for i in range(200):
        a = list(map(int,input().strip().split()))
        if len(a) == 0 :break
        absum = a[0] + a[1]
        for j in range(1,8):
            if absum < 10:
                print(1)
                break
            elif int(absum/pow(10,j)) == 1:
                print(j+1)
                break

### FIXED CODE ###

import fileinput as fi
if __name__ == "__main__":
    for i in fi.input():
        a,b = list(map(int,i.strip().split()))
        print(len(str(a+b)))
def nC2(n):
    x = 1
    for i in range(2, n+1):
        x *= i
    return x//2

def main():
    N = int(input())
    S = [sorted(input()) for _ in range(N)]
    counter = {}
    for s in S:
        if s in counter:
            counter[s] += 1
        else:
            counter[s] = 1
    ans = sum([nC2(v) for v in counter.values()])
    print(ans)

main()

### FIXED CODE ###

def nC2(n):
    if n < 2:
        return 0
    return n * (n-1) // 2

def main():
    N = int(input())
    S = [''.join(sorted(input())) for _ in range(N)]
    counter = {}
    for s in S:
        if s in counter:
            counter[s] += 1
        else:
            counter[s] = 1
    ans = sum([nC2(v) for v in counter.values()])
    print(ans)

main()
# coding:utf-8
# C - Grand Garden

N = int(input())
h = list(map(int,input().split()))
h += [0]
ans = 0

for n in range(100):
    for i in range(N+1):
        if h[i] != 0:
            h[i] -= 1
            add = True
        else:
            if add:
                ans += 1
            add = False

print(ans)


### FIXED CODE ###

N = int(input())
h = list(map(int,input().split()))
h += [0]
add = False
ans = 0
for n in range(100):
    for i in range(N+1):
        if h[i] != 0:
            h[i] -= 1
            add = True
        else:
            if add:
                ans += 1
            add = False
print(ans)
import numpy as np

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

points = [list(map(int, input().split())) for _ in range(N)]

def distance(p1, p2):
  squares = np.square(np.arange(p1) - np.arange(p2))
  return np.sqrt(squares.sum())

count = 0
for i in range(N):
  for j in range(N):
    if i != j:
      dist = distance(points[i], points[j])
      count += dist.is_integer() * 1

print(count)


### FIXED CODE ###

import numpy as np

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

points = np.array([list(map(int, input().split())) for _ in range(N)])

def distance(p1, p2):
  squares = np.square(p1 - p2)
  return np.sqrt(squares.sum())

count = 0
for i in range(N):
  for j in range(i+1, N):
    dist = distance(points[i], points[j])
    count += dist.is_integer() * 1

print(count)
N = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
sat = 0

for i in a:
  sat += b[i]
  pre = i
  if pre + 1 == i:
    sat += c[pre]

print(sat)  

### FIXED CODE ###

N = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]
c = [int(i) for i in input().split()]
sat = 0

pre = -1
for i in a:
  sat += b[i-1]
  #print(b[i-1])
  if pre + 1 == i:
    sat += c[pre-1]
    #print("c", c[pre-1])
  pre = i
print(sat)
A  = list(map(int,input().split()))

a = sorted(A)

if a[2]=a[0]+a[1]:
  print('Yes')
  
else:
  print('No')
  


  

### FIXED CODE ###

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

a = sorted(A)

if a[2]==a[0]+a[1]:
  print('Yes')
  
else:
  print('No')
H,N=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(N)]
mxa=max(a for a,b in ab)
dp=[0]*(N+mxa)
for i in range (N+mxa):
    dp[i]=min(dp[i-a]+b for a,b in ab)
print(min(dp[H:]))

### FIXED CODE ###

H,N=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(N)]
x=max(a for a,b in ab)
dp=[0]*(H+x)
for i in range (1,H+x):
    dp[i]=min(dp[i-a]+b for a,b in ab)
print(min(dp[H:]))
N,M = map(int,input().split())
A = [0]*M
B = [0]*M
for i in range(M):
    A[i],B[i] = map(lambda x:int(x)-1,input().split())

def check_connect(A,B):
    a = cnt[A]
    b = cnt[B]
    if a==-1 and b==-1:
        connect.append([A,B])
        cnt[A] = len(connect)-1
        cnt[B] = cnt[A]
        return 1
    if a == b:
        return 0
    if a==-1:
        a,b = b,a
        A,B = B,A
    if b==-1:
        connect[a] += [B]
        cnt[B] = a
        return len(connect[a])-1
        
    tmp1 = len(connect[a])
    tmp2 = len(connect[b])
    if tmp2 > tmp1:
        a,b = b,a
    connect[a] = connect[a] + connect[b]
    for i in connect[b]:
        cnt[i] = a
    tmp3 = tmp1+tmp2
    connect[b] = []
    return (tmp3*(tmp3-1)-tmp1*(tmp1-1)-tmp2*(tmp2-1))//2

connect = []
cnt = -np.ones(N,dtype=int)
dfubensa = np.zeros(M,dtype=int)
for i in range(M-1,-1,-1):
    dfubensa[i] = check_connect(A[i],B[i])

fubensa = dfubensa[0]
print(fubensa)
for i in range(1,M):
    fubensa = fubensa+ dfubensa[i]
    print(fubensa)

### FIXED CODE ###

N,M = map(int,input().split())
A = [0]*M
B = [0]*M
for i in range(M):
    A[i],B[i] = map(lambda x:int(x)-1,input().split())

def check_connect(A,B):
    a = cnt[A]
    b = cnt[B]
    if a==-1 and b==-1:
        connect.append([A,B])
        cnt[A] = len(connect)-1
        cnt[B] = cnt[A]
        return 1
    if a == b:
        return 0
    if a == -1:
        a,b,A,B = b,a,B,A
    if b==-1:
        connect[a] += [B]
        cnt[B] = a
        return len(connect[a])-1
        
    tmp1 = len(connect[a])
    tmp2 = len(connect[b])
    if tmp2 > tmp1:
        a,b = b,a
    connect[a] += connect[b]
    for i in connect[b]:
        cnt[i] = a
    tmp3 = tmp1+tmp2
    connect[b] = []
    return (tmp3*(tmp3-1)-tmp1*(tmp1-1)-tmp2*(tmp2-1))//2

connect = []
cnt = [-1]*N
dfubensa = [0]*M
for i in range(M-1,-1,-1):
    dfubensa[i] = check_connect(A[i],B[i])

fubensa = dfubensa[0]
print(fubensa)
for i in range(1,M):
    fubensa += dfubensa[i]
    print(fubensa)
a = input()
b = input()
c = input()
x = input()
count = 0
for i in range(min(x // 500 + 1, a)):
    for j in range(min((x - i * 500) // 100 + 1, b)):
        if (x - i * 500 - j * 100) // 50 <= c:
            count += 1
print(count)

### FIXED CODE ###

a, b, c, x = map(int, [input() for i in range(4)])
count = 0
for i in range(min(x // 500, a) + 1):
    for j in range(min((x - i * 500) // 100, b) + 1):
        if x - i * 500 - j * 100 <= c * 50:
            count += 1
print(count)
n, m = map(int,input().split())
if n%2 == 0:
    print(-1)
    exit()
else:
    if m >= n:
        print(-1)
        exit()

1/0

### FIXED CODE ###

m, k= map(int, input().split())

if 2**m <= k:
    print(-1)
    exit()

if m == 1:
    if k == 0:
        print("0 0 1 1")
    if k == 1:
        print(-1)
    exit()

li = []
for i in range(2**m):
    if i != k:
        li.append(i)
li = li + [k] + list(reversed(li)) + [k]
print(" ".join(map(str, li)))
S = input()
N = len(S)
K = (N+1)//2
X = set()
if N&1:
  X = {S[K-1]}
  l = K-2
  r = K
else:
  X = set()
  l = K-1
  r = K
  
while l:
  X.add(S[l])
  X.add(S[r])
  if len(X)>1: break
  K += 1
  l -= 1
  r += 1

print(K)

### FIXED CODE ###

S = input()
N = len(S)

if len(set(S))==1:
  print(N)
  exit()

K = (N+1)//2
X = set()
if N&1:
  X = {S[K-1]}
  l = K-2
  r = K
else:
  X = set()
  l = K-1
  r = K
  
while l:
  X.add(S[l])
  X.add(S[r])
  if len(X)>1: break
  K += 1
  l -= 1
  r += 1

print(K)
a,b,k = map(int,input().split())

ans1=0
ans2=0
if k>=a:
    ans1=0
    if a+b=<k:
        ans2=0
    else:
        ans2=b-(k-a)
else:
    ans1=a-k
    ans2=b
print(ans1,ans2)

### FIXED CODE ###

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

ans1=0
ans2=0
if k>=a:
    ans1=0
    if a+b<=k:
        ans2=0
    else:
        ans2=b-(k-a)
else:
    ans1=a-k
    ans2=b
print(ans1,ans2)
A, B = map(int, input())
print(max(max(A+B, A-B), A*B))

### FIXED CODE ###

A, B = map(int, input().split())
print(max([A+B, A-B, A*B]))
A,B = map(int, input().split())
if A==B:
  print("draw")
elif A == 1 or (b != 1 and A>B):
  print("Alice")
else:
  print("Bob")


### FIXED CODE ###

A,B = map(int, input().split())
if A==B:
  print("Draw")
elif A == 1 or (B != 1 and A>B):
  print("Alice")
else:
  print("Bob")
import math

a, b = map(float, input().split())
if a = 0 or b = 0:
    print(0)
else:
    print(int(a*b))


### FIXED CODE ###

A, B = input().split()
   
A = int(A)
B = int(float(B) * 100 + .5)
   
A *= B
print(A // 100)
N, K = map(int, input().split())
B = [0]*N
for i in input().split():
  B[int(i)] += 1
print(sum(sorted(B)[:-K]))

### FIXED CODE ###

N, K = map(int, input().split())
B = [0]*(N+1)
for i in input().split():
  B[int(i)] += 1
print(sum(sorted(B)[:-K]))
n,p = map(int,input().split())
a = list(map(int,input().split()))

s = [0]*n
for i in range(n):
    if a[i]%2 == 0:
        s[i] = 0
    else:
        s[i] = 1
import collections
c = collections.Counter(s)
odd  = c[1]
even = c[0]
x = 0
i = 0
while  2*i+p <= even:
    x += comb(even, i, exact=True)
    i += 1
from scipy.special import comb
ans = 0
i = 0
while  2*i+p <= odd:
    ans += comb(odd, 2*i+p, exact=True)*x
    i += 1
if p == 0:
    print(ans)
else:
    print(ans*2)

### FIXED CODE ###

import math
def comb(n, r): #comb(int, int)
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
n,p = map(int,input().split())
a = list(map(int,input().split()))
a_even = 0
a_odd = 0
for i in range(n):
    if a[i]%2 == 0:
        a_even += 1
    else:
        a_odd += 1
ans = 0
if p%2 == 0:
    k = 0
    for i in range(10**10):
        if 2*i > a_odd:
            break
        k += comb(a_odd, 2*i)
    print(k*2**a_even)
else:
    k = 0
    for i in range(10**10):
        if 2*i+1 > a_odd:
            break
        k += comb(a_odd, 2*i+1)
    print(k*2**a_even)