io.Source.stdin.getLines.toList.map{s=>println(s.reverse.dropWhile{_=='1'}.replaceFirst("0","1").reverse.padTo(s.size,"0").mkString)}