#include <bits/stdc++.h>
using namespace std;
long long dp[400][400];
long long f[400][400];
bool flag[400];
int main() {
  memset(dp, 63, sizeof(dp));
  memset(f, 63, sizeof(f));
  int n, m, K;
  scanf("%d%d%d", &n, &m, &K);
  for (int i = 0; i < m; i++) {
    int l, r, c;
    scanf("%d%d%d", &l, &r, &c);
    for (int j = l; j <= r; j++) flag[j] = 1;
    f[l][r] = min(f[l][r], (long long)c);
  }
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    if (flag[i]) cnt++;
  }
  if (cnt < K) {
    printf("-1\n");
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = i; j <= n; j++) {
      for (int k = i; k <= j; k++) {
        f[i][k] = min(f[i][k], f[i][j]);
        f[k][j] = min(f[k][j], f[i][j]);
      }
    }
  }
  dp[0][0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= i; j++) {
      for (int k = 0; k <= i; k++) {
        dp[i][j] = min(dp[i][j], dp[k][j]);
        if (j >= (i - k))
          dp[i][j] = min(dp[i][j], dp[k][j - (i - k)] + f[k + 1][i]);
      }
    }
  }
  long long ret = 1e20;
  for (int i = K; i <= n; i++) {
    ret = min(ret, dp[n][i]);
  }
  cout << ret << endl;
  return 0;
}
