import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String str = scan.nextLine();
int k = Integer.valueOf(scan.nextLine().trim());
System.out.println(str.substring(0, k));
}
}