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.io.*;

public class _034B {

    public static void main(String[] args) throws IOException {
        Scan in = new Scan();
        int[] values = new int[in.nextInt()];
        int n = in.nextInt();
        for (int i = 0; i < values.length; i++) {
            values[i] = in.nextInt();
        }
        java.util.Arrays.sort(values);
        int sum = 0;
        for (int i = 0; i < n; i++) {
            if (values[i] <= 0) {
                sum += values[i];
            }
        }
        System.out.println(sum * -1);
    }
}
class Scan {

    private final InputStream stream;
    private final byte EOF = -1, NL = '\n', DASH = '-', SPACE = ' ', R = '\r';
    private final byte[] buffer;
    private char[] charBuff;
    private int $index, $readCount;

    public Scan(InputStream stream, int bufferSize, int chrBuffSize) {
        this.stream = stream;
        this.buffer = new byte[bufferSize];
        this.charBuff = new char[chrBuffSize];
    }

    public Scan(InputStream stream, int buffSize) {
        this(stream, buffSize, 0xff);
    }

    public Scan(InputStream stream) {
        this(stream, 0xffff, 0xff);
    }

    public Scan() {
        this(System.in, 1 << 16, 1 << 8);
    }

    private void skip(byte skp) throws IOException {
        if ($readCount == EOF) return;
        for (;;) {
            while ($index < buffer.length) {
                if (buffer[$index] > skp) return;
                $index++;
            }
            $readCount = stream.read(buffer);
            $index = 0;
            if ($readCount == EOF) return;
        }
    }

    private void quadCharSize() {
        char[] tmp = new char[charBuff.length << 2];
        for (int i = 0; i < charBuff.length; i++) tmp[i] = charBuff[i];
        charBuff = tmp;
    }

    public String next() throws IOException {
        skip(SPACE);
        if ($readCount == EOF) return null;

        for (int i = 0;;) {
            while ($index < $readCount) {
                if (buffer[$index] > SPACE) {
                    if (i == charBuff.length) quadCharSize();
                    charBuff[i++] = (char)buffer[$index++];
                } else
                    return new String(charBuff, 0, i);
            }
            $readCount = stream.read(buffer);
            $index = 0;
            if ($readCount == EOF) return new String(charBuff, 0, i);
        }
    }

    public char[] nextArr() throws IOException {
        skip(SPACE);
        if ($readCount == EOF) return null;

        for (int i = 0;;) {
            while ($index < $readCount) {
                if (buffer[$index] > SPACE) {
                    if (i == charBuff.length) quadCharSize();
                    charBuff[i++] = (char)buffer[$index++];
                } else
                    return java.util.Arrays.copyOf(charBuff, i);
            }
            $readCount = stream.read(buffer);
            $index = 0;
            if ($readCount == EOF) return java.util.Arrays.copyOf(charBuff, i);
        }
    }

    public String nextLine() throws IOException {
        if ($readCount == EOF) return null;

        for (int i = 0;;) {
            while ($index < $readCount) {
                if (buffer[$index] == NL) {
                    $index ++;
                    return new String(charBuff, 0, i);
                } else {
                    if (i == charBuff.length) quadCharSize();
                    charBuff[i++] = (char)buffer[$index++];
                }
            }
            $readCount = stream.read(buffer);
            $index = 0;
            if ($readCount == EOF) return new String(charBuff, 0, i);
        }
    }

    public char[] nextLineArr() throws IOException {
        if ($readCount == EOF) return null;

        for (int i = 0;;) {
            while ($index < $readCount) {
                if (buffer[$index] == NL) {
                    $index++;
                    return java.util.Arrays.copyOf(charBuff, i);
                } else {
                    if (i == charBuff.length) quadCharSize();
                    charBuff[i++] = (char)buffer[$index++];
                }
            }
            $readCount = stream.read(buffer);
            $index = 0;
            if ($readCount == EOF) return java.util.Arrays.copyOf(charBuff, i);
        }
    }

    public int nextInt() throws IOException {
        skip(SPACE);
        if ($readCount == EOF) throw new IOException();

        int res = 0;
        boolean neg = false;
        if (buffer[$index] == DASH) {
            neg = true;
            $index++;
        }

        for (;;) {
            while ($index < $readCount) {
                if (buffer[$index] > SPACE) {
                    res = (res << 3) + (res << 1);
                    res += buffer[$index++] - '0';
                } else return neg ? -res : res;
            }

            $index = 0;
            $readCount = stream.read(buffer);
            if ($readCount == EOF) return neg ? -res : res;
        }
    }

    public long nextLong() throws IOException {
        skip(SPACE);
        if ($readCount == EOF) throw new IOException();

        long res = 0;
        boolean neg = false;
        if (buffer[$index] == DASH) {
            neg = true;
            $index++;
        }
        for (;;) {
            while ($index < $readCount) {
                if (buffer[$index] > SPACE) {
                    res = (res << 3) + (res << 1);
                    res += buffer[$index++] - '0';
                } else
                    return neg ? -res : res;
            }

            $index = 0;
            $readCount = stream.read(buffer);
            if ($readCount == EOF) return neg ? -res : res;
        }
    }

    public float nextFloat() throws IOException {
        return Float.parseFloat(next());
    }

    public double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }
}
