#include using namespace std; typedef long long ll; int main() { ll N; ll M; cin >> N; cin >> M; N/=1000; cout <