#include <bits/stdc++.h>
using namespace std;
const int modd = 1e9 + 7;
inline long long int add(long long int a, long long int b) {
  return a + b >= modd ? a + b - modd : a + b;
}
inline void inc(long long int& a, long long int b) { a = add(a, b); }
inline long long int sub(long long int a, long long int b) {
  return a - b < 0 ? a - b + modd : a - b;
}
inline void dec(long long int& a, long long int b) { a = sub(a, b); }
const long long int inf = 1e18;
const long long int mxN = 200004;
const long long int di[] = {0, -1, 0, 1};
const long long int dj[] = {1, 0, -1, 0};
signed main() {
  long long int n, m, k;
  cin >> n >> m >> k;
  vector<vector<long long int>> cst(n + 1, vector<long long int>(n + 1, inf));
  for (long long int i = 0; i < m; i++) {
    long long int l, r, c;
    cin >> l >> r >> c;
    for (long long int x = l; x < r + 1; x++) cst[l][x] = min(cst[l][x], c);
  }
  vector<vector<long long int>> dp(n + 1, vector<long long int>(n + 1, inf));
  dp[0][0] = 0;
  for (long long int i = 1; i < n + 1; i++) {
    for (long long int j = 0; j < k + 1; j++) {
      if (!j)
        dp[i][j] = 0;
      else {
        for (long long int l = 1; l < i; l++) {
          dp[i][j] = min(dp[i][j], dp[l][j]);
        }
        for (long long int l = 1; l <= j && l <= (i); l++) {
          if (dp[i - l][j - l] != inf)
            dp[i][j] = min(dp[i][j], cst[i - l + 1][i] + dp[i - l][j - l]);
        }
      }
    }
  }
  long long int ans = inf;
  for (long long int i = k; i < n + 1; i++) ans = min(ans, dp[n][i]);
  if (ans == inf) ans = -1;
  cout << ans;
}
