#include <bits/stdc++.h>
using namespace std;
const int M = 200005, N = 405;
const long long inf = 1e18;
int n, m, k;
long long f[N][N], ad[N][N];
long long F(int i, int h) {
  if (h == 0) return 0;
  if (i == n) return inf;
  long long &ret = f[i][h];
  if (ret + 1) return ret;
  ret = F(i + 1, h);
  for (int j = i; j < n; j++) {
    if (ad[i][j] != -1)
      ret = min(ret, ad[i][j] + F(j + 1, max(0, h - (j - i + 1))));
  }
  return ret;
}
int main(void) {
  scanf("%d %d %d", &n, &m, &k);
  memset(ad, -1, sizeof ad);
  for (int i = 0; i < m; i++) {
    int l, r, c;
    scanf("%d %d %d", &l, &r, &c);
    l--, r--;
    for (int j = l; j <= r; j++) {
      if (ad[j][r] == -1 || ad[j][r] > c) ad[j][r] = c;
    }
  }
  memset(f, -1, sizeof f);
  long long res = F(0, k);
  printf("%lld\n", res >= inf ? -1 : res);
  return 0;
}
