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.lang.*;
	import java.io.*;
	import java.math.*;

	
	public class practice{
		public static void main(String[] args){
				
			FastScanner inp = new FastScanner();
			int n = inp.nextInt();
			
			int m = inp.nextInt();
			PriorityQueue<Integer> q = new PriorityQueue<>();
			
			for(int i=0;i<n;i++)
				q.add(inp.nextInt());
			
			int sum=0;
			while(!q.isEmpty() && q.peek()<0 && m-->0) {
				sum += q.poll();
			}
			System.out.println(sum*(-1));
			
			

			

		}
		
		
		static ArrayList<ArrayList<Integer>> subsets(int n){
			//n=21 time = 1.5
			//n=20 time = 0.6
			//n=19 time = 0.4
			//n=18 time = 0.2
			//n=17 time = 0.1
			ArrayList<ArrayList<Integer>> arr = new ArrayList<>();
			ArrayList<Integer> just = new ArrayList<>();
			
			for(int i=1;i<=n;i++) just.add(i);
			arr.add(just);
			
			subsetsRecursiveFunc(arr,1,n,new ArrayList<Integer>());
			
			return arr;
		}
		protected static void subsetsRecursiveFunc(ArrayList<ArrayList<Integer>> arr, int k, int n, ArrayList<Integer> current) { 
			if(k== n+1) return;
			ArrayList<Integer> yo = new ArrayList<>(current);
			current.add(k);
			arr.add(yo);
			subsetsRecursiveFunc(arr,k+1,n,current);
			subsetsRecursiveFunc(arr,k+1,n,yo);
			
		}
		 
		static int gcd(int a, int b)
		{ 
		    if (a == 0)
		       return b*b;
		    if (b == 0)
		       return a*a;
		  
		 
		    if (a == b)
		        return a*a;
		  
		 
		    if (a > b)
		        return gcd(a-b, b);
		    return gcd(a, b-a);
		}
		
		static int lcm(int a, int b) {
			return (a*b)/gcd(a,b);
		}

		
		static boolean  isPrime(int n) {
			if(n <=1 )return false;
			if(n==2) return true;
			if(n%2==0) return false;
			for(int i=3;i<=Math.sqrt(n);i+=2)
				if(n%i==0) return false;
			return true;
		}
		static void incrementCount(HashMap<Integer,Integer> map, int key) {
			if(map.containsKey(key))
				map.put(key, map.get(key) +1);
			else
				map.put(key, 1);
		}
		
		private static int countDigits(int l) {
				if (l >= 1000000000) return 10;
				if (l >= 100000000) return 9;
				if (l >= 10000000) return 8;
				if (l >= 1000000) return 7;
				if (l >= 100000) return 6;
				if (l >= 10000) return 5;
				if (l >= 1000) return 4;
				if (l >= 100) return 3;
				if (l >= 10) return 2;
				return 1;
			}
		private static int countDigits(long l) {
				if (l >= 1000000000000000000L) return 19;
				if (l >= 100000000000000000L) return 18;
				if (l >= 10000000000000000L) return 17;
				if (l >= 1000000000000000L) return 16;
				if (l >= 100000000000000L) return 15;
				if (l >= 10000000000000L) return 14;
				if (l >= 1000000000000L) return 13;
				if (l >= 100000000000L) return 12;
				if (l >= 10000000000L) return 11;
				if (l >= 1000000000L) return 10;
				if (l >= 100000000L) return 9;
				if (l >= 10000000L) return 8;
				if (l >= 1000000L) return 7;
				if (l >= 100000L) return 6;
				if (l >= 10000L) return 5;
				if (l >= 1000L) return 4;
				if (l >= 100L) return 3;
				if (l >= 10L) return 2;
				return 1;
			}

	}
		

	class FastScanner {
	    BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	    StringTokenizer st=new StringTokenizer("");
	    String next() {
	        while (!st.hasMoreTokens())
	            try {
	                st=new StringTokenizer(br.readLine());
	            } catch (IOException e) {
	                e.printStackTrace();
	            }
	        return st.nextToken();
	    }
	    int[] intArr(int n) {
	    	int[] arr = new int[n];
	    	for(int i=0;i<n;i++)
	    		arr[i] = nextInt();
	    	return arr;
	    }
	    String[] StringArr(int n) {
	    	String[] arr = new String[n];
	    	for(int i=0;i<n;i++)
	    		arr[i] = next();
	    	return arr;
	    }
	    long[] longArr(int n) {
	    	long[] arr = new long[n];
	    	for(int i=0;i<n;i++)
	    		arr[i] = nextLong();
	    	return arr;
	    }
	    String nextLine()
	    {
	        String str = "";
	        try
	        {
	            str = br.readLine();
	        }
	        catch (IOException e)
	        {
	            e.printStackTrace();
	        }
	        return str;
	    }

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong() {
	        return Long.parseLong(next());
	    }
	}
