output_description: Print the desired string in one line.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
      w
attempt: 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()]  # WideIntPoint
  
  
  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)]  # HeightString
  
  
  def mi(n):
      return [wi() for _ in range(n)]  # MatrixInt
  
  
  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)
  
problem_description: 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.
samples: [{"input": "abcdefgh\n    3", "output": "adg\n    \n\nWhen we write down `abcdefgh`, starting a new line after every three letters,\nwe get the following:\n\nabc  \ndef  \ngh\n\nConcatenating the letters at the beginnings of these lines, we obtain `adg`.\n\n* * *"}, {"input": "lllll\n    1", "output": "lllll\n    \n\n* * *"}, {"input": "souuundhound\n    2", "output": "suudon"}]