words = input()
number = int(input())
print(words[0:number])