fixed const, tested, fixed input reader
added example input and output