#include <iostream>
using namespace std;

int main() {
int x, n = 0;
cin >> x;
while (x >= 0) {
  ++n;
  cin >> x;
}
cout << n;
	return 0;
}