print+(<>/1e3/<>^0)*1e3