str1 = input()
n = int(input())

print(str1[:n])  # 字符串可以直接切片