using System;

namespace ConsoleApp5
{
    class Program
    {
        static void Main(string[] args)
        {
            var x = Console.ReadLine().Split();
            int n = Convert.ToInt32(x[0]);
            int k = Convert.ToInt32(x[1]);
            int s = 0;
            x = Console.ReadLine().Split();
            for (int i = 0; i < n; i++)
            {
                int elementNiza = Convert.ToInt32(x[i]);
                s += elementNiza;
            }
            Console.WriteLine(s);
        }
    }
}