#include <stdio.h> int main() { char arr[1000]; int k=0; gets(arr); scanf("%d",&k); for(int i=0;i<k;i++) { printf("%c",arr[i]); } return 0; }