#include <bits/stdc++.h>
const long long inf = 10000000000000000ll;
long long f[301][301], g[301][301], h[301][301], min, c;
int n, m, t, l, r;
long long fmin(long long x, long long y) { return (x < y) ? x : y; }
int main() {
  scanf("%d %d %d\n", &n, &m, &t);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) g[i][j] = inf;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) h[i][j] = inf;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d%I64d", &l, &r, &c);
    h[l][r - l + 1] = fmin(h[l][r - l + 1], c);
  }
  for (int i = n; i > 1; i--) {
    for (int j = 1; j <= n - i + 1; j++) {
      h[j][i - 1] = fmin(h[j][i - 1], h[j][i]);
      h[j + 1][i - 1] = fmin(h[j + 1][i - 1], h[j][i]);
    }
    for (int j = 1; j <= n - i + 1; j++) g[j][j + i - 1] = h[j][i];
  }
  for (int i = 1; i <= n; i++) g[i][i] = fmin(g[i][i], h[i][1]);
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j <= n - i + 1; j++)
      for (int k = j + 1; k <= j + i; k++)
        g[j][j + i] = fmin(g[j][j + i], g[j][k - 1] + g[k][j + i]);
  }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) f[i][j] = inf;
  for (int i = 1; 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] = fmin(f[i][j], f[i - k][j - k] + g[i - k + 1][i]);
      for (int k = i + 1; k <= n; k++) f[k][j] = fmin(f[k][j], f[i][j]);
    }
  min = inf;
  for (int i = t; i <= n; i++) min = fmin(min, f[n][i]);
  if (min == inf)
    printf("-1\n");
  else
    printf("%I64d\n", min);
  return 0;
}
