Input stream until 10^14 chars for stream mode.