import java.util.*;
import java.io.*;

public class coldComputer
{
    public static void main(String[] iphonex)
    {   
        Scanner sc = new Scanner(System.in);
        
        // Read in number of temps
        int num_temps = sc.nextInt();
        // long long_value = sc.nextLong();
        // String string_val = sc.next();
        // String input_line = sc.nextLine();
        // double double_val = sc.nextDouble();
        
        // Store the temps for no reason
        ArrayList<Integer> temps = new ArrayList<Integer>();
        
        // Initialize counter for "cold" days
        int counter = 0;
        
        /*
        // Read in the temps as integers using a for loop
        for (int i = 0; i < num_temps; i++)
        {
            // Read in stuff
            int temp = sc.nextInt();
            if (temp < 0)
                counter++;
        }
        */
        
        // Demonstrating the utility of the Scanner class
        while (sc.hasNextInt())
        {
            // Read in the value
            temps.add(sc.nextInt());
            
            // Check if the last value added was cold
            // Use -1 because of 0 indexing
            if (temps.get(temps.size() - 1) < 0)
            {
                counter++;
            }
        }
        
        // Fast printing
        PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        out.println(counter);
        out.close();
        
        // Slow printing (probably good enough!)
        // System.out.println(counter);
    }
}