1 test case fail

#include
using namespace std;
int main() {
int n;
int sum=0;
while(true){
cin>>n;
sum=sum+n;
if(sum<1){
break;
}
cout << n << endl;
}

}