#include <iostream>
using namespace std;
int main() {
int x, n = 0;
cin >> x;
while (x >= 0) {
++n;
cin >> x;
}
cout << n;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CmludCB4LCBuID0gMDsKY2luID4+IHg7CndoaWxlICh4ID49IDApIHsKICArK247CiAgY2luID4+IHg7Cn0KY291dCA8PCBuOwoJcmV0dXJuIDA7Cn0=