Once Bob got to a sale of old TV sets. There were n TV sets at that sale. TV set with index i costs ai bellars. Some TV sets have a negative price — their owners are ready to pay Bob if he buys their useless apparatus. Bob can «buy» any TV sets he wants. Though he's very strong, Bob can carry at most m TV sets, and he has no desire to go to the sale for the second time. Please, help Bob find out the maximum sum of money that he can earn.

Input

The first line contains two space-separated integers n and m (1 ≤ m ≤ n ≤ 100) — amount of TV sets at the sale, and amount of TV sets that Bob can carry. The following line contains n space-separated integers ai ( - 1000 ≤ ai ≤ 1000) — prices of the TV sets. 

Output

Output the only number — the maximum sum of money that Bob can earn, given that he can carry at most m TV sets.

Examples

Input

5 3
-6 0 35 -2 4


Output

8


Input

4 2
7 0 0 -7


Output

7
		import java.util.*;
		import java.math.*;
	    import java.io.*;
	     
	    public class problem2 {
	    	 public static int isSubstring(String s1, String s2) 
	    	    { 
	    	        int M = s1.length(); 
	    	        int N = s2.length(); 
	    	      
	    	        /* A loop to slide pat[] one by one */
	    	        for (int i = 0; i <= N - M; i++) { 
	    	            int j; 
	    	      
	    	            /* For current index i, check for 
	    	            pattern match */
	    	            for (j = 0; j < M; j++) 
	    	                if (s2.charAt(i + j) != s1.charAt(j)) 
	    	                    break; 
	    	      
	    	            if (j == M) 
	    	                return i; 
	    	        } 
	    	      
	    	        return -1; 
	    	    } 
	    	public static void merge(int arr[], int l, int m, int r) 
	    	    { 
	    	        // Find sizes of two subarrays to be merged 
	    	        int n1 = m - l + 1; 
	    	        int n2 = r - m; 
	    	  
	    	        /* Create temp arrays */
	    	        int L[] = new int [n1]; 
	    	        int R[] = new int [n2]; 
	    	  
	    	        /*Copy data to temp arrays*/
	    	        for (int i=0; i<n1; ++i) 
	    	            L[i] = arr[l + i]; 
	    	        for (int j=0; j<n2; ++j) 
	    	            R[j] = arr[m + 1+ j]; 
	    	  
	    	  
	    	        /* Merge the temp arrays */
	    	  
	    	        // Initial indexes of first and second subarrays 
	    	        int i = 0, j = 0; 
	    	  
	    	        // Initial index of merged subarry array 
	    	        int k = l; 
	    	        while (i < n1 && j < n2) 
	    	        { 
	    	            if (L[i] <= R[j]) 
	    	            { 
	    	                arr[k] = L[i]; 
	    	                i++; 
	    	            } 
	    	            else
	    	            { 
	    	                arr[k] = R[j]; 
	    	                j++; 
	    	            } 
	    	            k++; 
	    	        } 
	    	  
	    	        /* Copy remaining elements of L[] if any */
	    	        while (i < n1) 
	    	        { 
	    	            arr[k] = L[i]; 
	    	            i++; 
	    	            k++; 
	    	        } 
	    	  
	    	        /* Copy remaining elements of R[] if any */
	    	        while (j < n2) 
	    	        { 
	    	            arr[k] = R[j]; 
	    	            j++; 
	    	            k++; 
	    	        } 
	    	    } 
	    	  
	    	    // Main function that sorts arr[l..r] using 
	    	    // merge() 
	    	   public static void sort(int arr[], int l, int r) 
	    	    { 
	    	        if (l < r) 
	    	        { 
	    	            // Find the middle point 
	    	            int m = (l+r)/2; 
	    	  
	    	            // Sort first and second halves 
	    	            sort(arr, l, m); 
	    	            sort(arr , m+1, r); 
	    	  
	    	            // Merge the sorted halves 
	    	            merge(arr, l, m, r); 
	    	        } 
	    	    } 
	    	public static void main(String[] args) throws IOException {
	    		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    		StringTokenizer st = new StringTokenizer(br.readLine());
	    		int n = Integer.parseInt(st.nextToken());
	    		int m = Integer.parseInt(st.nextToken());
	    		int arr[] = new int[n];
	    		st = new StringTokenizer(br.readLine());
	    		for(int i=0;i<n;i++) {
	    			arr[i] = Integer.parseInt(st.nextToken());
	    		}
	    		sort(arr, 0, n-1);
	    		int sum = 0;
	    		for(int i=0;i<m;i++) {
	    			if(arr[i]<0)sum+=Math.abs(arr[i]);
	    		}
	    		System.out.println(sum);
	    	}
	    }