import strutils let n = parseInt readLine stdin m = parseInt readLine stdin echo n div 1000 div m * 1000