#include <bits/stdc++.h>
using namespace std;
int n, m, k;
const long long inf = 1LL << 62;
long long f[310][310];
long long cost[310][310];
int main() {
  int l, r;
  long long c;
  while (cin >> n >> m >> k) {
    for (int i = 1; i <= n; ++i)
      for (int j = i; j <= n; ++j) cost[i][j] = inf;
    for (int i = 0; i < m; ++i) {
      cin >> l >> r >> c;
      for (int j = max(r - k + 1, l); j <= r; ++j)
        cost[j][r] = min(cost[j][r], c);
    }
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= n; ++j) f[i][j] = inf;
    f[0][0] = 0;
    long long ans = inf;
    for (int i = 1; i <= n; ++i) {
      f[i][0] = 0;
      for (int j = 1; j <= min(i, k); ++j) {
        f[i][j] = f[i - 1][j];
        for (int p = 0; p < i; ++p) {
          if ((j >= i - p) && (cost[p + 1][i] < inf) &&
              (f[p][j - (i - p)] < inf))
            f[i][j] = min(f[i][j], f[p][j - (i - p)] + cost[p + 1][i]);
        }
        if (j >= k) ans = min(ans, f[i][j]);
      }
    }
    cout << (ans < inf ? ans : -1) << endl;
  }
  return 0;
}
