#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
int mark[310], cost[310][310];
long long f[310][310];
vector<int> vec[310];
multimap<int, int> mp[310];
int main() {
  int n, m, kk;
  cin >> n >> m >> kk;
  memset(mark, 0, sizeof(mark));
  memset(cost, 0, sizeof(cost));
  for (int i = 0; i < m; i++) {
    int l, r, c;
    scanf("%d%d%d", &l, &r, &c);
    if (cost[l][r] == 0)
      cost[l][r] = c;
    else
      cost[l][r] = min(cost[l][r], c);
  }
  for (int i = 1; i <= n; i++)
    for (int j = i; j <= n; j++)
      if (cost[i][j]) {
        vec[j].push_back(i);
        mp[j].insert(make_pair(cost[i][j], i));
      }
  memset(f, 0x3f, sizeof(f));
  for (int i = 0; i <= n; i++) f[i][0] = 0;
  long long ans = 1000000000;
  ans *= 200000;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < vec[i].size(); j++) mark[vec[i][j]]++;
    for (int j = 0; j <= n; j++) f[i][j] = f[i - 1][j];
    for (int j = 1; j <= i; j++) {
      if (mp[i].size() == 0) break;
      for (int k = j; k <= i; k++) {
        f[i][k] = min(f[i - j][k - j] + mp[i].begin()->first, f[i][k]);
        if (k >= kk && f[i][k] < ans) ans = f[i][k];
      }
      if (mark[i - j + 1]) {
        mark[i - j + 1]--;
        for (multimap<int, int>::iterator p = mp[i].begin(); p != mp[i].end();
             p++)
          if (p->first == cost[i - j + 1][i]) {
            mp[i].erase(p);
            break;
          }
      }
    }
  }
  if (ans == (long long)1000000000 * 200000)
    cout << -1 << endl;
  else
    cout << ans << endl;
}
