#include <bits/stdc++.h>

#define all(cont) cont.begin(), cont.end()

using std::cin, std::cout, std::vector, std::set, std::pair, std::string, std::map, std::unordered_map, std::bitset, std::unordered_set;
using std::multiset;

#include <ext/pb_ds/assoc_container.hpp>
template <typename T>
using ordered_set = __gnu_pbds::tree<T, __gnu_pbds::null_type, std::less<T>, __gnu_pbds::rb_tree_tag, __gnu_pbds::tree_order_statistics_node_update>;
template <typename T, typename V>
using ht = __gnu_pbds::gp_hash_table<T, V>;

using i32 = int; using i64 = long long;
using u32 = unsigned int; using u64 = unsigned long long;
using f32 = float; using f64 = long double;
using pi32 = std::pair<i32, i32>; using pi64 = std::pair<i64, i64>;
using vi32 = std::vector<i32>; using vi64 = std::vector<i64>;
using vvi32 = std::vector<vi32>; using vvi64 = std::vector<vi64>;
using vpi32 = std::vector<pi32>; using vpi64 = std::vector<pi64>;
using vvpi32 = std::vector<vpi32>; using vvpi64 = std::vector<vpi64>;
using si32 = std::set<i32>; using si64 = std::set<i64>;
using spi32 = std::set<pi32>; using spi64 = std::set<pi64>;
using mpi32 = std::map<i32, i32>; using mpi64 = std::map<i64, i64>;
using umpi32 = std::unordered_map<i32, i32>; using umpi64 = std::unordered_map<i64, i64>;

using i128 = __int128; using u128 = unsigned int; using f128 = __float128;

template <typename T>
using v = std::vector<T>;
template <typename T, typename comp = std::less<T>>
using s = std::set<T, comp>;
template <typename T, typename V>
using p = std::pair<T, V>;
template <typename T, typename V>
using m = std::map<T, V>;
template <typename T, typename V>
using um = std::unordered_map<T, V>;

template <typename T>
std::istream& operator>>(std::istream &is, std::vector<T> &rhs) {
    for (auto&& i : rhs)
        is >> i;
    return is;
}
template <typename T>
std::ostream& operator<<(std::ostream &os, std::vector<T> const &rhs) {
    for (auto const& i : rhs) {
        os << i << " ";
    }
    return os;
}
template <typename T, typename V>
std::istream& operator>>(std::istream &is, std::pair<T, V> &rhs) {
    is >> rhs.first >> rhs.second;
    return is;
}
template <typename T, typename V>
std::ostream& operator<<(std::ostream &os, std::pair<T, V> const& rhs) {
    os << rhs.first << " " << rhs.second << "\n";
    return os;
}

#define MULTITEST_ 0
#define PRECALCULATE_ 0

struct solution {
    auto operator()(i32 n_test = 0) -> void {
        i32 n, k;
        cin >> n >> k;
        i32 cur = n;
        vi64 a(n);
        cin >> a;
        cout << std::accumulate(a.begin(), a.begin() + k, 0ll) + k << '\n';
    }
    void inline static precalculate();
};

auto main() -> i32 {
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
#if PRECALCULATE_
    solution::precalculate();
#endif
#if MULTITEST_
    i32 t; cin >> t;
    for (i32 i = 0; i < t; ++i) {
        solution solve; solve(i);
    }
#else
    solution solve; solve();
#endif
    return 0;
}
