#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool Up(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool Down(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
inline int getus() {
  int tmp, c;
  while (tmp = fgetc(stdin), tmp < '0' || tmp > '9')
    ;
  tmp -= '0';
  while (c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0';
  return tmp;
}
inline int getint() {
  int tmp, c, flag;
  while (flag = fgetc(stdin), flag != '-' && (flag < '0' || flag > '9'))
    ;
  if (flag == '-')
    tmp = 0;
  else
    tmp = flag - '0';
  while (c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0';
  return flag == '-' ? -tmp : tmp;
}
int N, M, K;
long long s[313];
long long opt[313][313];
deque<pair<int, int> > ss[313];
int main() {
  memset(s, 63, sizeof(s));
  memset(opt, 63, sizeof(opt));
  scanf("%d %d %d", &N, &M, &K);
  for (int i = (1); i <= (M); ++i) {
    int s, t, c;
    scanf("%d %d %d", &s, &t, &c);
    ss[t].push_back(pair<int, int>(s, c));
  }
  for (int i = (1); i <= (N); ++i) sort(ss[i].begin(), ss[i].end());
  long long ans = LLONG_MAX;
  for (int i = (0); i <= (N); ++i) {
    opt[i][0] = 0;
    for (int j = (i + 1); j <= (N); ++j) {
      for (; !ss[j].empty() && ss[j].front().first <= i + 1; ss[j].pop_front())
        Down(s[j], (long long)ss[j].front().second);
    }
    for (int j = (0); j <= (i); ++j) {
      long long v = opt[i][j];
      if (v >= 4000000000000000000ll) continue;
      if (j >= K) Down(ans, v);
      Down(opt[i + 1][j], v);
      for (int k = (i + 1); k <= (N); ++k) Down(opt[k][j + k - i], v + s[k]);
    }
  }
  if (ans >= 4000000000000000000ll)
    cout << "-1" << endl;
  else
    cout << ans << endl;
  return 0;
}
