#include <bits/stdc++.h>
using namespace std;
template <typename T>
T getint() {
  T x = 0, p = 1;
  char ch;
  do {
    ch = getchar();
  } while (ch <= ' ');
  if (ch == '-') p = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * p;
}
template <typename T1, typename T2>
bool umin(T1 &x, const T2 &y) {
  if (x > y) return x = y, true;
  return false;
}
template <typename T1, typename T2>
bool umax(T1 &x, const T2 &y) {
  if (x < y) return x = y, true;
  return false;
}
const int maxn = (int)3e2 + 10;
const int inf = (int)1e9 + 5;
const int mod = (int)1e9 + 7;
const long long llinf = (long long)1e18 - 1;
const long double pi = acos(-1.0);
int n, m, k;
long long dp[maxn][maxn];
long long cost[maxn][maxn];
vector<pair<int, int> > q[maxn];
int main() {
  for (int i = (0); i < (maxn); i++)
    for (int j = (0); j < (maxn); j++) dp[i][j] = llinf;
  cin >> n >> m >> k;
  vector<int> best(n + 1, inf);
  while (m--) {
    int l, r, c;
    cin >> l >> r >> c;
    q[l].push_back(make_pair(r, c));
  }
  for (int l = (1); l < (n + 1); l++) {
    for (auto z : q[l]) best[z.first] = min(best[z.first], z.second);
    for (int r = (n + 1) - 1; r >= (l); r--) {
      cost[l][r] = best[r];
      if (r < n) cost[l][r] = min(cost[l][r], cost[l][r + 1]);
    }
  }
  dp[0][0] = 0;
  for (int r = (1); r < (n + 1); r++) {
    for (int c = (0); c < (n + 1); c++) {
      dp[r][c] = dp[r - 1][c];
      for (int l = (1); l < (r + 1); l++) {
        if (cost[l][r] != inf && c >= r - l + 1)
          dp[r][c] = min(dp[r][c], dp[l - 1][c - (r - l + 1)] + cost[l][r]);
      }
    }
  }
  long long res = llinf;
  for (int c = (k); c < (n + 1); c++) res = min(res, dp[n][c]);
  if (res == llinf) res = -1;
  cout << res << endl;
  return 0;
}
