#include <bits/stdc++.h>
using namespace std;
const int MAX = 100000 + 10;
const int NUM = 400 + 10;
const int INF = (int)1e9 + 10;
int n, m, k;
long long f[NUM][NUM];
vector<pair<int, int> > to[NUM];
long long zz[NUM];
void update(long long& a, long long b) {
  if (b == -1) return;
  if (a == -1 || b < a) a = b;
}
int main() {
  int i;
  scanf("%d%d%d", &n, &m, &k);
  int l, r, c;
  for ((i) = (1); (i) <= (m); ++(i)) {
    scanf("%d%d%d", &l, &r, &c);
    to[r].push_back(make_pair(l, c));
  }
  memset(f, -1, sizeof f);
  f[0][0] = 0;
  for ((i) = (1); (i) <= (n); ++(i)) {
    int j, k;
    memset(zz, -1, sizeof zz);
    for ((j) = (0); (j) != ((int)to[i].size()); ++(j)) {
      int l = to[i][j].first;
      int c = to[i][j].second;
      update(zz[l - 1], c);
    }
    for ((j) = (0); (j) <= (n); ++(j)) f[i][j] = f[i - 1][j];
    for ((j) = (1); (j) != (i); ++(j)) update(zz[j], zz[j - 1]);
    for ((j) = (0); (j) != (i); ++(j))
      for ((k) = (0); (k) <= (n); ++(k))
        if (f[j][k] != -1 && zz[j] != -1)
          update(f[i][i - j + k], f[j][k] + zz[j]);
  }
  cout << f[n][k] << endl;
  return 0;
}
