<reponame>AI-Rabbit/Python-problems<gh_stars>0
# p14.py

word = input()
length = len(word)
len1 = int(input())

print(word[0:len1])

# p14.py

word = input()
length = len(word)
len1 = int(input())

print(word[0:len1])