#include <bits/stdc++.h> using namespace std; int main() { string s; int k; cin>>s; cin>>k; cout<<s.substr(0,k)<<endl; }