#include <bits/stdc++.h>
using namespace std;
long long cost[405][405], ans[405][405];
long long fans(int n, int k) {
  if (k <= 0) return 0;
  if (k > n) return 10000000000000000LL;
  if (ans[n][k] != -1) return ans[n][k];
  ans[n][k] = fans(n - 1, k);
  ans[n][k] = min(ans[n][k], fans(n, k + 1));
  int i;
  long long nmn = 10000000000000000LL;
  for (i = 1; i <= n; i++) {
    nmn = min(nmn, cost[i][n]);
    ans[n][k] = min(ans[n][k], fans(i - 1, k - n + i - 1) + nmn);
  }
  return ans[n][k];
}
int main() {
  int n, m, i, j, k, l, r, c;
  long long val;
  cin >> n >> m >> k;
  for ((i) = 0; (i) < (n); (i)++)
    for ((j) = 0; (j) < (n); (j)++) cost[i + 1][j + 1] = 10000000000000000LL;
  memset(ans, -1, sizeof(ans));
  for ((i) = 0; (i) < (m); (i)++) {
    scanf("%d%d%d", &l, &r, &c);
    if (cost[l][r] > c) cost[l][r] = c;
  }
  val = fans(n, k);
  if (val != 10000000000000000LL)
    cout << val << endl;
  else
    cout << -1 << endl;
  return 0;
}
