Problem:
 Score : 200 points    Problem Statement You are given a string S consisting of lowercase English letters.
We will write down this string, starting a new line after every w letters. Print the string obtained by concatenating the letters at the beginnings of these lines from top to bottom.      Constraints  1 \leq w \leq |S| \leq 1000  S consists of lowercase English letters.  w is an integer.         Input Input is given from Standard Input in the following format:  S  w       Output Print the desired string in one line.        Sample Input 1 abcdefgh
3      Sample Output 1 adg  When we write down abcdefgh , starting a new line after every three letters, we get the following:  abc def gh  Concatenating the letters at the beginnings of these lines, we obtain adg .       Sample Input 2 lllll
1      Sample Output 2 lllll       Sample Input 3 souuundhound
2      Sample Output 3 suudon

Solution (Python):
import math

S = input()
w = int(input())

t = math.ceil(len(S) / w)
ans = ""
for i in range(t):
    ans = ans + S[i*w]
print(ans)

Solution (Python):
s = list(input())
w = int(input())
t = []
for i in range(0, len(s), w):
    t.append(s[i])
print("".join(t))

Solution (Python):
s=list(str(input()))
w=int(input())
t=''
for i in range(len(s)):
  if i%w==0:
    t+=s[i]
print(t)

Solution (Python):
S = input()
w = int(input())
for i in range(len(S)):
  if i % w == 0: print(S[i],end = "")

Solution (Python):
S = input()
w = int(input())

print(S[::w])

Solution (Python):
from sys import stdin

s = stdin.readline().rstrip()
w = int(stdin.readline().rstrip())

print(s[::w])

Solution (Python):
s=input()
ans=""
w=int(input())

for i in range(len(s)):
    if i%w==0:
        ans+=s[i]
print(ans)

Solution (Python):
s = input()
w = int(input())
for i in range(0, len(s), w):
    print(s[i], end="")
print()

Solution (Python):
s = input()
n = int(input())
print(s[::n])

Solution (Python):
S = input()
w = int(input())
i = 0
while i < len(S):
    print(S[i], end = '')
    i += w
print()

Solution (Python):
s=input()
n=int(input())
print("".join([l for l in s[::n]]))

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10


def solve():
    s = S()
    w = II()
    print(s[::w])
    return



if __name__ == '__main__':
    solve()

Solution (Python):

S = input()
w = int(input())
ans = S[0]
cnt = 1
for i in range(1, len(S)):
    if cnt == w:
        ans += S[i]
        cnt = 0
    cnt += 1
print(ans)

Solution (Python):
s = input()
w = int(input())

ans = s[::w]
print(ans)

Solution (Python):
s = list(input())
w = int(input())
ans = ''
for i in range(len(s)):
    if i==0 or i%w==0:
        ans += s[i]
print(ans)

Solution (Python):
S = input()
w = int(input())

print(S[::w])

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
s = input()
w = int(input())

len_ = 0
if len(s) % w == 0:
    len_ = len(s)//w
else:
    len_ = len(s) // w + 1
for i in range(len_):
    print(s[w*i], end="")
print()

Solution (Python):
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')

S = input()
w = I()
print(S[::w])

Solution (Python):
S = input()
w = int(input())
a = len(S)//w
b = 1 if len(S) % w else 0
ans = ''
for i in range(a+b):
    ans += S[i*w]
print(ans)

Solution (Python):
print(*(list(input())[::int(input())]),sep='')

Solution (Python):
S = input()
w = int(input())
ans = ''
for i in range(len(S)):
    if i % w == 0:
        ans += S[i]
print(ans)

Solution (Python):

s = input()
w = int(input())
c = ""

for i in range(len(s)):
    if i % w == 0:
        c += s[i]
print(c)

Solution (Python):
def main():
    S = input()
    w = int(input())
    for i in range(0, len(S), w):
        print(S[i], end="")
    print()


if __name__ == '__main__':
    main()

Solution (Python):
a = list(input())
b = int(input())
print("".join(a[::b]))

Solution (Python):
s = input()
N = int(input())
print(s[0:len(s):N])

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):

import math
S = str(input())
w = int(input())
L = len(S)
ans = ""
for i in range(math.ceil(L/w) ):
    ans+=S[w*i]
    
print(ans)

Solution (Python):
S = list(input())
w = int(input())
o = []

for i in range(0,len(S),w):
  o.append(S[i])
  
print(''.join(o))

Solution (Python):
S = input()
w = int(input())

ans = []

for i in range(0,len(S),w):
    ans.append(S[i])


pg = ''.join(ans) 

print(pg)

Solution (Python):
S = input()
w = int(input())
ans = ""

for i in range(len(S)):
    if (i % w == 0):
        ans += S[i]

print(ans)

Solution (Python):
a = input()
b = [str(c) for c in a]
c=int(input())
d=len(b)
x=[]
for i in range(0,d,c):
	x.append(b[i])
print("".join(x))

Solution (Python):
S = str(input())
w = int(input())
N = len(S)
roop = int((N-1)/w+1)
ans = []
for i in range (roop):
  ans.append(S[i*w])
Ans =''.join(ans)
print(Ans)

Solution (Python):
S = input()
w = int(input())

for i, si in enumerate(S):
    if i % w == 0:
        print(si, end='')

Solution (Python):
s=str(input())
n=int(input())
ans=""
for i in range(len(s)):
    if i%n==0:
        ans+=s[i]
print(ans)

Solution (Python):
s = list(input())
w = int(input())
index = 0
l = []
while index <= len(s) - 1:
  l.append(s[index])
  index += w
print(*l, sep="")

Solution (Python):
s = input()
w = int(input())

ans = []
for i in range(0, len(s), w):
    ans.append(s[i])
print("".join(ans))

Solution (Python):
from math import ceil
S=input()
w=int(input())
s=""
for i in range(len(S)):
    if i%w==0:
        s="".join((s,S[i]))
print(s)

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
s=input()
w=int(input())
t=''
for i in range(len(s))[::w]:
  t+=s[i]
print(t)

Solution (Python):
s = input()
w = int(input())

print(s[::w])

Solution (Python):
import math
s=input()
w=int(input())
ans=""
for i in range(math.ceil(len(s)/w)):
    ans+=s[i*w]
print(ans)

Solution (Python):
s=input()
w=int(input())
ans=''
for i in range(len(s)):
    if i%w==0:
        ans+=s[i]
print(ans)

Solution (Python):
S = input()
w = int(input())

sl = []
ans = ''
tmp_s = ''
for i, s in enumerate(S):
    tmp_s += s
    if (i+1) % w == 0:
        ans += tmp_s[0]
        tmp_s = ''
else:
    if len(tmp_s) >= 1:
        ans += tmp_s[0]
print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s = input()
n = int(input())
ss = ""
for i in range(0, len(s), n):
    ss += s[i]
print(ss)

Solution (Python):
import random as rng
import itertools as it
import collections as col
import heapq as hq
import sys
import copy as cp
sys.setrecursionlimit(10**9)


def dump_impl(*objects):
    print(*objects, file=sys.stderr)


def dump_dummy(*objects):
    pass


dump = dump_impl if "DEBUG" in sys.argv else dump_dummy

S = input()
w = int(input())
ans = []
for i in range((len(S)+w-1)//w):
    ans.append(S[i*w])
print("".join(ans))

Solution (Python):
S = input()
w = int(input())
ans = ""

for i in range(0, len(S), w):
    ans += S[i]
print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s = input()
w = int(input())
ans = "".join(s[::w])
print(ans)

Solution (Python):
s=input()
s = list(s)

n=int(input())
i = 0
res = []

while i < len(s):
    res.append(s[i])
    i += n

print(''.join(res))

Solution (Python):
S = input()
N = int(input())
result = []
for i in range(0,len(S),N):
  result.append(S[i])
print("".join(result))

Solution (Python):
S = input()
w = int(input())
s = ''
if w == 1:
  print(S)
else:
  if len(S) % w == 0:
    for i in range(len(S) // w):
      s += S[i * w]
    print(s)
  else:
    for i in range((len(S) // w) + 1):
      s += S[i * w]
    print(s)

Solution (Python):

s = input()
w = int(input())
print(s[::w])

Solution (Python):
def main(s: str, w: int):
    print(s[::w])


if __name__ == "__main__":
    s = input()
    w = int(input())

    main(s, w)

Solution (Python):


S = input()
w = int(input())

print(S[::w])

Solution (Python):
s = input()
w = int(input())
ans = ""
for i in range(-(-len(s) // w)):
    ans = ans + s[i * w]

print(ans)

Solution (Python):
s = input()
w = int(input())
ans = []
for i in range(len(s)):
    if i%w==0:
        ans.append(s[i])
ans = ''.join(ans)
print(ans)

Solution (Python):
s = input()
w = int(input())

for i in range(0, len(s), w):
    print(s[i], end="")

Solution (Python):
s=str(input())
w=int(input())

for i in range(len(s)):
    if i%w==0:
        print(s[i],end="")

Solution (Python):
s = input()
w = int(input())
for i in range(len(s)):
    if i % w == 0:
        print("{}".format(s[i]), end="")

Solution (Python):
s = input()
n = int(input())
ans = ''
m = 0
while m < len(s):
    ans += s[m]
    m += n
    
print(ans)

Solution (Python):
s,w=str(input()),int(input())
y="".join([s[i] for i in range(0,len(s),w)])
print(y)

Solution (Python):
S = input()
t = int(input())
a = ""
for i in range(len(S)):
  if i % t == 0:
    a += S[i]
    
print (a)

Solution (Python):
sl = list(input())
w = int(input())

print("".join(sl[::w]))

Solution (Python):
S = input()
W = int(input())
for i in range(0,len(S),W):
	print(S[i],end="")

Solution (Python):
s = input()
w = int(input())
ans = ""
for i in range(0,len(s),w):
	ans += s[i]

print(ans)

Solution (Python):
s=input()
w=int(input())
import math
n = math.ceil(len(s) / w)
ans=""
for i in range(n):
  ans += s[i * w]
print(ans)

Solution (Python):

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

l =[]
k = 0
s = a[0]
for i in a:
    if k == b:
        s+=i
        k =0
    k+=1
print(s)

Solution (Python):

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

l =[]
k = 0
s = a[0]
for i in a:
    if k == b:
        s+=i
        k =0
    k+=1
print(s)

Solution (Python):
S,w=open(0);print(S[::int(w)])

Solution (Python):
S = input()
w = int(input())
ans = ''
for i in range(len(S)):
    if i % w == 0:
        ans += S[i]
print(ans)

Solution (Python):
S=input()
k=int(input())
ans=[]
for i in range(0,len(S),k):
  ans.append(S[i])
print("".join(ans))

Solution (Python):
def main():
    S = input()
    w = int(input())
    ans = ""
    for i in range(len(S)):
        if i%w==0:
            ans += S[i]
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin
s = stdin.readline().rstrip()
n = int(stdin.readline().rstrip())
print(s[::n])

Solution (Python):
from sys import stdin

s = stdin.readline().rstrip()
n = int(stdin.readline().rstrip())

s = s[::n]

print(s)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s = input()
w = int(input())

ans = ""

for i in range(len(s)):
    if i % w == 0:
        ans += s[i]

print(ans)

Solution (Python):
s=input()
n=int(input())
i=0
while n*i<len(s):
    print(s[n*i],end='')
    i+=1

Solution (Python):
S = input()
w = int(input())

N = len(S)

ans = ''
for i in range(0, N, w):
	ans += S[i]
print(ans)

Solution (Python):
s=input()
w=int(input())
ans=''
for i in range(len(s)):
    if i%w==0:
        ans+=s[i]
print(ans)

Solution (Python):
S = input()
w = int(input())
print(''.join([s for s in S[::w]]))

Solution (Python):
S=input()
w=int(input())

print(S[0::w])

Solution (Python):
s = input()
w = int(input())
ans = []
for i in range(0,len(s),w):
    ans.append(s[i])
print(''.join(ans))

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S = input()
w = int(input())
ans = ''
for i in range(0, len(S), w):
    ans += S[i: i + 1]

print(ans)

Solution (Python):
S = input()
w = int(input())

print(S[::w])

Solution (Python):
S = input()
w = int(input())
ans = ""
for i in range(0,len(S),w):
  ans += S[i]
print(ans)

Solution (Python):

strings=[input() for string in range(2)]
string=strings[0]
num=int(strings[1])
result=""
for i in range(len(string)):
    if i% num==0:
        result=result+string[i]
    i=i+1
print(result)

Solution (Python):
s=input()
n=int(input())
print(s[::n])

Solution (Python):


s=input()
w=int(input())

print(s[::w])

Solution (Python):
s = list(input())
ans = ""
w = int(input())
for i in range(0,len(s),w):
    ans += s[i]
print(ans)

Solution (Python):
S = input().strip()
w = int(input())
x = S[::w]
print(x)

Solution (Python):

s = input()
w = int(input())
print(s[0::w])

Solution (Python):
s=input()
n=int(input())
print(s[::n])

Solution (Python):
s=input()
n=int(input())
w=[]
i=0
while i < len(s):
  w.append(s[i])
  i += n
print(''.join(w))

Solution (Python):
def examB():
    S = SI()
    w = I()
    ans = ""
    i=0
    while(i<len(S)):
        ans +=S[i]
        i +=w

    print(ans)



import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    s = str(readline().rstrip().decode('utf-8'))
    w = int(readline())
    ans = []
    for i in range(0, len(s), w):
        ans.append(s[i])
    print("".join(ans))


if __name__ == '__main__':
    solve()

Solution (Python):
print(input()[::int(input())])

Solution (Python):
print(*input()[::int(input())],sep='')

Solution (Python):
print(input()[0::int(input())])

Solution (Python):
import sys
input = sys.stdin.readline
S = list(input())[: -1]
w = int(input())
print("".join(S[: : w]))

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s=input()
w=int(input())
ans=''
for i in s[::w]:
	ans+=i
print(ans)

Solution (Python):
S = list(input())
k = int(input())

ans = ''
for i, s in enumerate(S):
  if i%k == 0:
    ans += s
print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S = list(input())
w = int(input())
print("".join(S[::w]))

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


S = sys.stdin.readline().rstrip()
w = int(sys.stdin.readline())
print(S[::w])

Solution (Python):
S = input()
w = int(input())
print(S[0::w])

Solution (Python):
s=input()
x=int(input())
ans=""
for i in range(0,len(s),x):
  ans+=s[i]
print(ans)

Solution (Python):
s = list(input())
w = int(input())
ans =[]
 
for i in range(len(s)):
    if i%w == 0:
        ans.append(s[i])
        
print("".join(ans))

Solution (Python):
s=list(input())
w=int(input())
x=[]
y=''
ans=''
count=[]
for i in range(len(s)):
    y+=s[i]
    if len(list(y))==w:
        x.append(y)
        y=''
    if i==len(s)-1 and y!='':
        x.append(y)
for j in range(len(x)):
    count=list(x[j])
    ans+=count[0]
print(ans)

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

s = input()
n = inp()
L = ''
for i in range(len(s))[::n]:
    L += s[i]
print(L)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S = input()
w = int(input())
ans = S[::w]
print(ans)

Solution (Python):
s = input()
w = int(input())
ans = ""
for i in range((len(s) // w) + 1):
    if i * w < len(s):
        ans += s[i * w]
print(ans)

Solution (Python):
S = input()
w = int(input())
ans = []

for i in range(0,len(S), w):
	ans.append(S[i])

print("".join(ans))

Solution (Python):
s=input()
w=int(input())
ans=[s[0]]
k=w
while k<len(s):
    ans.append(s[k])
    k+=w
print("".join(ans))

Solution (Python):
S=input()
W=int(input())
for i in range((len(S)+W-1)//W):
  print(S[i*W],end="")

Solution (Python):
s = input()
w = int(input())

ans = ''
for i in range(0, len(s), w):
    ans += s[i]
print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s=str(input())
w=int(input())
print(s[::w])

Solution (Python):
S=input()
w=int(input())

ans=''
for i in range(0,len(S),w):
  ans+=S[i]
print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):
S = list(input())
w = int(input())
for i in range(0, len(S), w):
  print (S[i], end ='')
print ()

Solution (Python):
S=input()
w=int(input())

ans=[]
cnt=0
while(w*cnt+1<=len(S)):
    ans.append(S[w*cnt])
    cnt+=1

print("".join(map(str,ans)))

Solution (Python):
def resolve():
    s = input()
    w = int(input())
    print(s[::w])


if __name__ == "__main__":
    resolve()

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    s = list(str(input().rstrip('\n')))
    w = int(input().rstrip('\n'))
    print("".join(s[::w]))


if __name__ == '__main__':
    slove()

Solution (Python):
s=list(input())
n=int(input())
ans=[]
m=len(s)//n
if len(s)%n!=0:
    m+=1
for i in range(m):
    ans.append(s[n*i])
print(''.join(ans))

Solution (Python):
s = input()
w = int(input())
ans = [s[i] if i % w == 0 else "" for i in range(len(s))]
print("".join(ans))

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    s = str(input().rstrip('\n'))
    w = int(input().rstrip('\n'))
    print(s[::w])


if __name__ == '__main__':
    slove()

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
import math

S = input()
w = int(input())

a = ''
for s in range(math.ceil(len(S) / w)):
    a += S[s*w]

print(a)

Solution (Python):
s = list(input())
n = int(input())
a = ''
for i in range(0, len(s), n):
  a += s[i]
print(a)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s=list(input())
n=int(input())


ans=''
for i in range(len(s)):
    if i*n<=len(s)-1:
        ans+=s[i*n]
print(ans)

Solution (Python):
s=input()
w=int(input())
ans=s[0::w]
print(ans)

Solution (Python):
S,w=input(),int(input())
print(S[0::w])

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
s=input()
w=int(input())
ans=""

i=0
while(i<len(s)):
    ans+=s[i]
    i+=w
print(ans)

Solution (Python):
def main():

    S = input()
    w = int(input())
    ans = ""
    for i in range(len(S)):
        if i % w == 0:
            ans += S[i]
    return ans
    
if __name__ == '__main__':
    print(main())

Solution (Python):



S = input()
w = int(input())

if len(S) / w == len(S) // w:
    length = len(S) // w
else:
    length = len(S) // w + 1

for i in range(length):
    print(S[w * i], end = "")

Solution (Python):
s=input()
d=""
n=int(input())
for i in range((len(s)+n-1)//n):
	d+=s[i*n]
print(d)

Solution (Python):
import math
S = input()
w = int(input())
k = []
ans = ""
ans_2 = ""
for i in range(math.ceil(len(S)/w)):
  ans += S[i*w]
print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s = input()
print(s[::int(input())])

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
S = input()
w = int(input())
r = "".join(S[::w])
print(r)

Solution (Python):
def solve(s, w):
    return "".join([s[i] for i in range(0, len(s), w)])

s = input()
w = int(input())
print(solve(s, w))

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
s = input()
w = int(input())
for i in range(0,len(s), w):
    print(s[i], end='')

Solution (Python):
S=input()
w=int(input())
ans=''
for i,s in enumerate(S):
    if not i%w:
        ans+=s
print(ans)

Solution (Python):
S = input()
w = int(input())
ans = ""
for i in range(0, len(S), w):
    ans += S[i]
print(ans)

Solution (Python):
s = input()
n = int(input())
print(s[::n])

Solution (Python):
S = str(input())
w = int(input())
ans = ""
for i in range(0, len(S), w):
    ans += S[i]
print(ans)

Solution (Python):
s = list(input())
w = int(input())
l = []
for i in range(len(s)):
    if i % w == 0:
        l.append(s[i])
for x in l:
    print(x,end="")

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
S = input()
w = int(input())

newS =[""]
i = 0

while i<len(S):
    newS.append(S[i])
    i = i+w

print("".join(newS))

Solution (Python):
S = input()
w = int(input())

newS = [""] * ((len(S) - 1 + w) // w)

for i in range(len(newS)):
    newS[i] = S[w * i]

print("".join(newS))

Solution (Python):
S = input()
w = int(input())

print(S[::w])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
def main():
    S = input()
    w = int(input())
    print(S[::w])


if __name__ == "__main__":
    main()

Solution (Python):
S=input()
N=int(input())
ans=""
k=0
for i in S:
        if k%N==0:
                ans+=i
        k+=1
print(ans)

Solution (Python):
s = input()
w = int(input())
for i in range((len(s)+w-1)//w):
    print(s[w*i],end="")

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
S = input()
w = int(input())
O = []

i = 0
while i < len(S):
    O.append(S[i])
    i += w

print("".join(O))

Solution (Python):
S = str(input())
w = int(input())
ans = ""
for i in range(0,len(S),w):
    ans += S[i]
print(ans)

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):
s = input()
print(s[::int(input())])

Solution (Python):
s = input()
w = int(input())

print(s[0::w])

Solution (Python):
s = input()
w = int(input())
ans = ''

for i in range(0, len(s), w):
    ans += s[i]

print(ans)

Solution (Python):
S = input()
W = int(input())

print(S[::W])

Solution (Python):
s = input()
w = int(input())
ans = ''
for i in range(len(s)):
    ans+=s[i*w]
    if (i+1) * w > len(s) - 1:
        break
print(ans)

Solution (Python):
S=input()
w=int(input())
print(S[::w])

Solution (Python):
S=input()
w=int(input())

print(S[::w])

Solution (Python):
s = input()
w = int(input())

print(s[::w])

Solution (Python):

def main():
    s = input()
    w = int(input())
    print(s[::w])


if __name__ == "__main__":
    main()

Solution (Python):
s=input()
w=int(input())
n=len(s)//w
b=[]
if len(s)%w==0:
    for i in range(n):
        b.append(s[i*w])
else:
    for i in range(n+1):
        b.append(s[i*w])
print(''.join(b))

Solution (Python):
S = input().rstrip()
w = int(input())
print(S[0::w])

Solution (Python):
S, w = input(), int(input())
ans = ""
for i in range(len(S)):
	if i % w == 0:
		ans += S[i]
print(ans)

Solution (Python):
s = input()
w = int(input())
ans = ""
i = 0
while i*w<len(s):
    ans +=s[i*w]
    i += 1
    if i*w >=len(s):
        break
print(ans)

Solution (Python):
S = input()
w = int(input())

ans = ''
for i in range(0, len(S), w):
    ans += S[i]

print(ans)

Solution (Python):
s = input()
w = int(input())
for i in range(len(s)//w+1):
    if i*w < len(s):
        print(s[i*w], end="")
print()

Solution (Python):
print(''.join(input()[::int(input())]))

Solution (Python):
s = str(input())
w = int(input())
print(s[0::w])

Solution (Python):
S=input()
w=int(input())
print(S[::w])

Solution (Python):

import sys
def input(): return sys.stdin.readline().rstrip()
def mi(): return map(int, input().split())


S = input()
w = int(input())

print(S[::w])

Solution (Python):
S = input()
w = int(input())
L = []
for i in range(len(S)):
        if i%w == 0:
                L.append(S[i])
print("".join(L))

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools, random
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; ansli = []; tmpli = []; candili = []
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]
def mi(n): return [wi() for _ in range(n)]
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]

s = s()
w = i()
cnt = 1
t = ""
for i in range(len(s)):
    if (cnt - 1) % w == 0:
        t += s[i]
    cnt += 1

print(t)

Solution (Python):
s = input().rstrip()
w = int(input())

print(s[::w])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S=input()
w=int(input())
a=len(S)
b=0
while b<=a-1:
        print(S[b],end="")
        b+=w

Solution (Python):
S = input()
w = int(input())

ans = S[::w]
print(ans)

Solution (Python):
S = input()
w = int(input())

ans = ""
for i in range((len(S) + w - 1) // w):
    ans += S[i * w]

print(ans)

Solution (Python):
s=input()
n=int(input())
ans=''
for i in range(len(s)):
  if i%n==0:
    ans+=s[i]
print(ans)

Solution (Python):
s=input()
n=int(input())
for i in range(0,len(s),n):
  print(s[i],end="")

Solution (Python):
s = input()
w = int(input())
ans = ''
count = 0
while count <= len(s)-1:
  ans += s[count]
  count += w
print(ans)

Solution (Python):
s,n=input(),int(input());ans=""
for i in range(len(s)):
  if i%n==0:ans+=s[i]
print(ans)

Solution (Python):
S = input()
w = int(input())

moji = ''

for i in range(len(S)):
    if i%w==0:
        moji += S[i]
print(moji)

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
S=input()
w=int(input())
print(S[::w])

Solution (Python):
s = input()
w = int(input())
ans = ""
for i in range(0,len(s),w):
  ans += s[i]
print(ans)

Solution (Python):
print(input()[::int(input())])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s = str(input())
w = int(input())
print(s[::w])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s=list(input())
w=int(input())
print(''.join(s[::w]))

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
from sys import stdin
moji=(stdin.readline().rstrip())
N=int(stdin.readline().rstrip())
ans=moji[0]
ite=len(moji)
for i in range(1,ite+1):
    if i*N > len(moji)-1:
        break
    ans=ans+moji[i*N]
print(ans)

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):

from math import ceil
S = input()
w = int(input())
print(''.join(S[i * w] for i in range(ceil(len(S) / w))))

Solution (Python):
import math
s = input()
w = int(input())
n = len(s)
ans = ''
for i in range(math.ceil(n/w)):
  ans += s[w*i]
print(ans)

Solution (Python):
S = input()
w = int(input())
list_w = []
for i in range(0,len(S),w):
  list_w.append(S[i])
print(''.join(list_w))

Solution (Python):
n=input()
s=int(input())
t=len(n)//s
c=""
for i in range((t+1 if len(n)%s!=0else t)):
    c+=n[i*s]
print(c)

Solution (Python):
s = input()
w = int(input())
a = ""
for i,j in enumerate(s):
  if i % w == 0:
    a += j
print(a)

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
L = list(input())
N = int(input())
ANS = []
for i in range(len(L)) :
    if i % N == 0 :
        ANS.append(L[i])
ans = "".join(ANS)
print(ans)

Solution (Python):
S = input()
w = int(input())
print(S[::w])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s=input()
w=int(input())
print(s[::w])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
S = input()
N = int(input())
print(*(S[i] for i in range(0, len(S), N)), sep='')

Solution (Python):
s=input()
w=int(input())
a=[]
for i in range(len(s)):
  if i%w==0:a.append(s[i])
print(''.join(a))

Solution (Python):
i=input;print(i()[::int(i())])

Solution (Python):
print(input()[::int(input())])

Solution (Python):
s = str(input())
w = int(input())
print(s[::w])

Solution (Python):

"""
B - Acrostic
https://beta.atcoder.jp/contests/soundhound2018-summer-qual/tasks/soundhound2018_summer_qual_b

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    S = input().strip()
    w = int(input())
    ans = [S[i] for i in range(0, len(S), w)]
    print(''.join(ans))


if __name__ == '__main__':
    main(sys.argv[1:])

Solution (Python):
import math

s = list(input())
w = int(input())
A = []
for k in range(int(math.ceil(len(s)/w))):
  A.append(s[k*w])
print(''.join(A))

Solution (Python):
s=input()
n=int(input())
print(s[::n])

Solution (Python):
def ip():
    return int(input())
    
def ipp():
    return map(int,input().split())
    
def sar():
    return list(ipp())
    
def pars(a):
    print(''.join(list(map(str, a))))
    print('\r')
    
def parl(a):
    print('\r'.join(list(map(str, a))))
    print('\r')
    


if __name__=='__main__':
    T=1
    
    for _ in range(T):
        s = input()
        k = ip()
        for i in range(0,len(s),k):
            print(s[i], end="")

Solution (Python):
S = input().strip()
w = int(input())

ans = S[::w]
print(ans)

Solution (Python):
a = input()
b = int(input())

c = ''
for i in range(len(a)):
	if(i%b == 0):
		c += a[i]
		
print (c)

Solution (Python):
s = input()
w = int(input())
i = 0
ans = ''
while i < len(s):
  ans += s[i]
  i += w
print(ans)

Solution (Python):
s=input()
n=int(input())
a=[]
for i in range(0,len(s),n):
	a.append(s[i])
print(*a,sep="")

Solution (Python):
s = input()
w = int(input())
print(s[::w])

Solution (Python):
S = input()
W = int(input())

for i in range(len(S)):
  if i % W == 0:
    print(S[i], end='')
print()

Solution (Python):
S = input()
N = int(input())

for s in S[::N]:
  print(s, end='')
print()

Solution (Python):
S = input()
w = int(input())

m = ""
for i in range(0, len(S), w):
    m += S[i]
print(m)

Solution (Python):
s = input()
w = int(input())

i = 0
r = ""
while i < len(s):
  r += s[i]
  i += w
  
print(r)