#include <stdio.h> int main() { char str[1000]; scanf("%s", str); int n; scanf("%d", &n); str[n] = '\0'; printf("%s\n", str); return 0; }