import java.util.*;

public class Main {
    public static void main(String[] args) {
        int count = 0;
        Scanner scanner = new Scanner(System.in);

        //write your code here......
        //我以为题目是动态判断
        while (scanner.hasNext()) {
            if (scanner.nextInt() > 0) {
                count++;
            } else {
                System.out.print(count);
            }
        }
    }
}