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):
S = list(input())
w = int(input())
counter = 1
res = ''
if w == 1:
    print(''.join(S))
else:
    for i in S:
        if counter == 1:
            res = res + i
            counter += 1
        elif counter == w:
            counter = 1
        else:
            counter += 1
    print(res)

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

l = "a"
i = 0
while True:
    try:
        l += S[i * w]
        i += 1
    except:
        break


print(l[1:])

Solution (Python):
a=input().strip()
n=int(input())
print(a[::n])

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

Solution (Python):
import sys

S = next(sys.stdin).strip()
w = int(next(sys.stdin))

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

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

i = 0
res = ''
while True:
    if i >= len(s):
        break
    res += s[i]
    i += w
print(res)

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())
ans = ''
for i in range(0, len(S), w):
    ans = ans + S[i]
print(ans)

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

i = 0
s = ''
while i < len(list_s):
    s += str(list_s[i])
    i += w
print(s)

Solution (Python):

"""
Created on Sat Jul  7 20:14:40 2018
SHPC_B
@author: maezawa
"""

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

n = len(s)
ans = []

for i in range(0,n,w):
    ans.append(s[i])
    
print(''.join(ans))

Solution (Python):
def main():
    s = input().strip()
    n = int(input())

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

    print(''.join([x[0] for x in xs]))
            
if __name__ == '__main__':
    main()

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

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

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

a = ""
for i in range((len(s) - 1) // w + 1):
    a += s[w * i]
print(a)

Solution (Python):
s = input()

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

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

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

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

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

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

Solution (Python):



def solve():
    s = input()
    d = int(input())
    print("".join(s[::d]))

if __name__=="__main__":
    solve()

Solution (Python):
s = raw_input().strip()
l = int(raw_input())
print s[::l]

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

l=len(S)

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

print ans

Solution (Python):
import math

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

times = math.ceil(len(s)/w)
ans = ''
for i in range(times):
  ans += s[i*w]

print(ans)

Solution (Python):
S = input()
w = int(input())
ans = ""
i = 0
while i < len(S):
    ans = ans + S[i]
    i = i + w

print(ans)

Solution (Python):
S = input()
n = int(input())
count = 0
ret = ''

for i, s in enumerate(S):
    if i % n == 0:
        ret += s

print(ret)

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

    ans = ""

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

    print(ans)


if __name__ == "__main__":
        main()

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

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

Solution (Python):
import math

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

for i in range( math.ceil(len(S)/w) ):
    print(S[i*w],end='')
print()

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

idx = 0
s_list = []
while idx < len(S):
    s_list.append(S[idx:idx + w])
    idx += w

s_join = []
for s in s_list:
    s_join.append(s[0])
print(''.join(s_join))

Solution (Python):
char = input()
num = int(input())

out = []
for i in range(0,len(char),num):
  out.append(char[i])

print("".join(out))

Solution (Python):
import math

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

S_list = list(S)
S_len = len(S)

for i in range(math.ceil(S_len / w)):
    print(S_list[i * w], end = "")

Solution (Python):
S = list(input())
w = int(input())
s = ''
for i, a in enumerate(S):
    if i%w == 0:
        s += a
else:
    print(s)

Solution (Python):
from sys import stdin, stdout
input = lambda: stdin.readline().rstrip()
write = stdout.write

def main():
    S = input()
    W = int(input())

    for i, s in enumerate(S):
        if not i % W:
            write(s)
    write('\n')

main()

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

answer = ''

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

print(answer)

Solution (Python):
S = input()
N = int(input())
print("".join([s for n, s in enumerate(S) if n % N == 0]))

Solution (Python):
def ketanowa(p):
    ans = 0
    p = str(p)
    for i in p:
        ans += int(i)
    return ans


def main():
    s = input()
    temp1 = input()
    temp1=int(temp1)
    ans=""
    
    for i in range(0,len(s),temp1):
        
        ans+=s[i] 
    print(ans)   

if __name__ == '__main__':
    main()

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

wlist = []
for i in range(0, len(words), w):
    wlist.append(words[i:i+w])
  
ans = ''
for wrd in wlist:
    ans += wrd[0]
  
print(ans)

Solution (Python):
S = list(raw_input())
w = int(raw_input())
ans = ''
for s in S[0::w]:
  ans += s
print ans

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

print(S[::w])

Solution (Python):
from math import ceil

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

ans = ''
n = ceil(len(S) / w)

for i in range(n):
    ans += S[i*w]
print(ans)

Solution (Python):
import math
s = input()
n = int(input())

ans = ""

for i in range(math.ceil(len(s)/n)):
  ans += s[i*n]

print(ans)

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

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

print(S[::w])

Solution (Python):
def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

S, = read_line(str)
n, = read_line(int)

print(S[::n])

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

S_list = list(S)
absS = len(S)
ans = []

for s in range(0, absS, w):
    ans.append(S_list[s])
    
print("".join(ans))

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

ret = ""

while True:
    ret += s[0]
    if len(s) < w + 1:
        break
    s = s[w:]

print(ret)

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

Solution (Python):
S=input()
w = int(input())
i=0
ans=[]
while True:
    ans.append(S[i])
    i += w
    if i >= len(S):
        break
print(''.join(map(str, ans)))

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


w = int(input())
print(''.join(string[::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):
text = input()
length = int(input())

out = text[::length]
print(out)

Solution (Python):




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


if __name__ == '__main__':
    main()

Solution (Python):
S=input()
N=int(input())
ans=[]
i=0

while(i<=len(S)-1):
  ans.append(S[i])
  i+=N

for i in range(len(ans)):
  print(ans[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())

ans = ''
for i in range(len(s)):
    if i % w == 0:
        ans += s[i]
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(0,len(s),w):
    print(s[i],end='')
print()

Solution (Python):


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

print(S[::w])

Solution (Python):

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

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

print(ret)

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

Solution (Python):
s=list(input())
N=int(input())
print("".join(s[::N]))

Solution (Python):

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

Solution (Python):
def solve():
    S = input()
    W = int(input())
    print(S[::W])


if __name__ == '__main__':
    solve()

Solution (Python):
s = input()
w = int(input())
max = len(s)
ss = ''
for k in list(range(0,max,w)):
    ss += s[k]
print(ss)

Solution (Python):


S=input()
n=int(input())
X=[]

for i in range(len(S)):
    if (i)%n==0:
        X.append(S[i])

ans=''.join(X)
print(ans)

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

print(S[0::w])

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

ans = [i for idx, i in enumerate(s) if idx%w==0]

print("".join(ans))

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

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

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

i = 0
while i < len(s):
    print(s[i], end='')
    i += w
print('')

Solution (Python):
if __name__ == '__main__':
    S = input()
    w = input()
    w = int(w)

    print(S[0::w])

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

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

count = 1
ans = s[0]

for i in s[1:]:
    if count == n:
        count = 0
        ans += i
    count += 1

print(ans)

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

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

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()
w=int(input())
ans=[]
for i in range(len(S)):
  if i%w==0:
    ans.append(S[i])

print("".join(ans))

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

ans = "" + S[0]

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

print(ans)

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())

str = ""

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

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

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())
out=""
for num,i in enumerate(s):
    if num%w==0:
        out+=i
print(out)

Solution (Python):
input_line = input()
num_return = int(input())

print(input_line[::num_return])

Solution (Python):
import textwrap

s = input()
w = int(input())
ts = textwrap.wrap(s, w)
print("".join(t[0] for t in ts))

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

print(S[::w])

Solution (Python):

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

ps = ''
while s:
    ps += s[:w][0]
    s = s[w:]

print(ps)

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

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

i = 0
res = ''
while N > 0:
    res += S[i*w: (i+1)*w][0]
    i += 1
    N -= w
print(res)

Solution (Python):
def main():
    s, w = input(), int(input())

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

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
a = input()
w = int(input())
k = ""

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

print(k)

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

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

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

print(s[::w])

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

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()
w = int(input())
ans = ""

for i,j in enumerate(S):
    if i % w == 0:
        ans += j
print(ans)

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

Solution (Python):
s = input()
b = int(input())
ans = ''
for i, v in enumerate(s):
    if i % b == 0:
        ans += v
print(ans)

Solution (Python):



a = list(input())
b = int(input())
ans = []
for i in range(0,len(a),b):
    ans.append(a[i])
print(''.join(ans))

Solution (Python):


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

pos = 0
res = ""
while pos < len(s):
    res = res + s[pos]
    pos += w

print(res)

Solution (Python):
S = list(input())
w = int(input())
s = ''
i = 0
for c in S:
    if i % w == 0:
        s += c
    i+=1
print(s)

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

a = [S[i] for i in range(0, len(S), w)]
print(''.join(a))

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

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

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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S, w):
    
    return S[::w]


def main():
    S = read_str()
    w = read_int()

    
    print(slv(S, w))


if __name__ == '__main__':
    main()

Solution (Python):
s = 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())

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

print(X)

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

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

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

Solution (Python):
S = list(input())
w = int(input())
ans = ""
i = 0
while i < len(S):
    ans += S[i]
    i += w
print(ans)

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

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

Solution (Python):
def main():
    s = raw_input().strip()
    w = input()
    print s[::w]


if __name__ == '__main__':
    main()

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

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

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()
w = int(input())
i = 0
ans = ""
while i < len(S):
    ans+=S[i]
    i+=w
print(ans)

Solution (Python):

def main():
	s = input()
	w = int(input())
	cnt = 0
	ans = ""
	while True:
		if cnt >= len(s):
			break
		ans += s[cnt]
		cnt += w
	print(ans)

if __name__ == '__main__':
	main()

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

print(''.join(s for s in S[::w]))

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

Solution (Python):
import sys
s=raw_input()
w=int(raw_input())
L=len(s)
i=0
while i<L:
  sys.stdout.write(s[i])
  i += w
sys.stdout.write('\n')

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())
ans = ''
for i in range(len(s)):
  if i % w == 0:
    ans += s[i]
print(ans)

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

new_str = ""

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

Solution (Python):
s = input()
k = int(input())
n = len(s)

ans = str()
for i in range(n):
    if i % k == 0:
        ans += s[i]

print(ans)

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

print(S[::w])

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

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

tmp = []
for i, s in enumerate(S):
    if i % w == 0:
        tmp.append(s)
print("".join(tmp))

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

Solution (Python):


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


print(s[::w])

Solution (Python):
def ilinp(): return list(map(int, input().split()))
def slinp(): return input().split()
def iinp(): return int(input())

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

Solution (Python):
import sys
import random

def rd():
        return sys.stdin.readline().rstrip()

def rdi():
        return [ int(x) for x in rd().split() ]

S = rd()
w, = rdi()

r = ""
while True:
        r = r + S[0]
        S = S[w:]
        if not S:
                break
print r

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

print(s[::w])

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())

cnt = 0
result = ""
while True:
    if cnt * w >= len(s):
        break
    result += s[cnt * w]
    cnt += 1
print(result)

Solution (Python):
s= raw_input()

w = int(input())

i = 0
ans = ""
while w*i < len(s):
	ans += s[w*i]
	i+= 1

print ans

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

Solution (Python):
S = input()
w = int(input())
print("".join([s for i,s in enumerate(S) if i % w == 0]))

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

Solution (Python):
import math
lis = []
s = str(input())
n = int(input())
for i in range(math.ceil(len(s)/n)):
    lis.append(s[n * i])
print("".join(lis))

Solution (Python):




s = input()
w = int(input())
ans = ''

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

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):
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

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())
ans = ''
for i in range(len(S)):
    if i % w == 0:
        ans += S[i]
print(ans)

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

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().strip()
w = int(input())
a = ""
for i in range(0, len(S), w):
    a += S[i]
print(a)

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

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())

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

Solution (Python):

s = list(input())
k = int(input())
print("".join(s[0::k]))

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()
w = int(input())

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

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

ans = [c for i, c in enumerate(s) if i % n == 0]
print(''.join(ans))

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

Ans = ""
while S:
    T,S = S[0:w],S[w:]
    Ans += T[0]

print(Ans)

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

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()
w = int(input())
N=len(S)
ans=[]
for i in range(0,N,w):
    ans.append(S[i])
print(''.join(map(str,ans)))

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

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

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

Solution (Python):
S = input()
w = int(input())
pos = 0
while True:
    print(S[pos], end='')
    pos += w
    if pos >= len(S):
        break
print()

Solution (Python):



if __name__ == '__main__':
    s = input()
    w = int(input())
    print(''.join(map(str, s[::w])))

Solution (Python):
if __name__ == '__main__':
    s = input()
    w = int(input())
    ans = s[::w]
    print(ans)

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

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

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

out = ''
for i, x in enumerate(S):
    if i % w == 0:
        out += x
        
print(out)

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

Solution (Python):
if __name__ == "__main__":
    s = input()
    w = int(input())
    print(s[::w])

Solution (Python):
s = input()
w = int(input())
n = len(s)
t = []
for p in range(0, n, w):
    t.append(s[p])

print(''.join(t))

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

Solution (Python):
S = list(input())
w = int(input())
ans = S[::w]
for a in ans:
    print(a, end="")
print()

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

print('')

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

result = S[::w]

print(result)

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().strip()
w=int(input().strip())
print(S[::w])

Solution (Python):
s = list(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(''.join([s[i] for i in range(len(s)) if i%w == 0]))

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

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

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

print()

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

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()
print(S[::int(input())])

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

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

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

Solution (Python):
S = raw_input()
w = int(raw_input())
print "".join(S[i] for i in xrange(0, len(S), w))

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):
from sys import exit, setrecursionlimit, stderr
from functools import reduce
from itertools import *
from collections import defaultdict
from bisect import bisect

setrecursionlimit(10**6)

def read():
  return int(input())

def reads():
  return [int(x) for x in input().split()]

S = input()
w = read()

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

print(s)

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

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

Solution (Python):


import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq





def solve(f):
    s = f.read_str()
    w = f.read_int()
    return ''.join(s[::w])


class Reader(object):
    def __init__(self, filename=None):
        self.file = open(filename) if filename is not None else None
        self.case = 1

    def __readline(self):
        return self.file.next().strip() if self.file else raw_input()

    def next_case(self):
        self.file.next()
        self.case += 1

    def read_int(self): return int(self.__readline())
    def read_float(self): return float(self.__readline())
    def read_long(self): return long(self.__readline())
    def read_decimal(self): return decimal.Decimal(self.__readline())
    def read_str(self): return self.__readline()

    def read_int_list(self): return map(int, self.__readline().split())
    def read_float_list(self): return map(float, self.__readline().split())
    def read_long_list(self): return map(long, self.__readline().split())
    def read_decimal_list(self): return map(decimal.Decimal, self.__readline().split())
    def read_str_list(self): return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv) > 1 else None
    f = Reader(filename)
    if f.file:
        while True:
            print "Case 
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

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

Solution (Python):
S = raw_input()
w = int(raw_input())
ans = ''
for i in xrange(0, len(S), w):
    ans += S[i]
print ans

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

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

Solution (Python):



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

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

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

Solution (Python):
import sys
import math
import collections
import itertools
import array
import inspect


sys.setrecursionlimit(10000)


def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))


def to_bin(x):
    return bin(x)[2:]



dp = None

def main():
    s = input()
    w = int(input())

    print(s[::w])

main()

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