#include using namespace std; using ll=long long; int main() { cin.tie(0)->sync_with_stdio(0); ll now=6000; for(int i=0;i<7;i++) { ll t;cin>>t; if(t==-1||now==-1) { now=-1; } else now-=t; cout<