#include <bits/stdc++.h>
using namespace std;
const int N = 333;
const int M = 1000010;
long long ans, n, m, kk, a[N], f[N][N], num[N][N];
int x[M], y[M], c[M];
int main() {
  cin >> n >> m >> kk;
  for (int i = (0); i <= (n + 1); ++i) {
    for (int j = (1); j <= (n + 1); ++j) {
      num[i][j] = 1e15;
    }
  }
  for (int i = (1); i <= (m); ++i) {
    scanf("%d%d%d", &x[i], &y[i], &c[i]);
    for (int j = (x[i]); j <= (y[i]); ++j) {
      num[x[i]][j] = min(num[x[i]][j], (long long)c[i]);
    }
  }
  ans = 1e15;
  for (int i = (0); i <= (n + 1); ++i) {
    for (int j = (1); j <= (n + 1); ++j) {
      f[i][j] = 1e15;
    }
  }
  for (int i = (0); i <= (n); ++i) {
    f[i][0] = 0;
  }
  for (int i = (1); i <= (n); ++i) {
    for (int j = (1); j <= (i); ++j) {
      for (int k = (1); k <= (j); ++k) {
        f[i][j] = min(f[i][j], f[i - 1][j]);
        f[i][j] = min(f[i][j], f[i - k][j - k] + num[i - k + 1][i]);
        if (j >= kk) {
          ans = min(ans, f[i][j]);
        }
        if (f[i][j] != 1e15) {
        }
      }
    }
  }
  if (ans == 1e15)
    puts("-1");
  else
    cout << ans << endl;
  return 0;
}
