+ 7
It will always work like that in SoloLearn. Since it's a remote interpreter/compiler, it has to process your program and all its input at once, so you need to provide it all beforehand.
It will still work properly on local environments, though. Provided the rest of the code is correct, that is ;)