#include <bits/stdc++.h>
const int NS = 330;
const long long INF = (1LL << 62) - 1;
int n, m, k;
long long dp[NS][NS], f[NS][NS], t;
long long Min(long long a1, long long b1) { return a1 < b1 ? a1 : b1; }
int main() {
  int a, b, d;
  while (~scanf("%d%d%d", &n, &m, &k)) {
    for (int i = 0; i <= n; i++) {
      for (int j = 0; j <= n; j++) f[i][j] = dp[i][j] = INF;
      f[i][i] = dp[i][0] = 0;
    }
    for (int i = 0; i < m; i++) {
      scanf("%d%d%d", &a, &b, &d);
      --a;
      f[a][b] = Min(f[a][b], d);
    }
    for (int j = 1; j <= n; j++) {
      for (int i = 1; i < j; i++) {
        f[i][j] = Min(f[i][j], f[i - 1][j]);
      }
    }
    for (int i = 1; i <= n; i++) {
      for (int j = 1; j <= i; j++) {
        dp[i][j] = dp[i - 1][j];
        for (int p = 0; p < i; p++) {
          if (j - i + p < 0) continue;
          t = dp[p][j - i + p] + f[p][i];
          dp[i][j] = Min(dp[i][j], t);
        }
      }
    }
    t = INF;
    for (int i = k; i <= n; i++) {
      t = Min(t, dp[n][i]);
    }
    if (t >= INF) t = -1;
    printf("%I64d\n", t);
  }
  return 0;
}
