#include <bits/stdc++.h>
#pragma comment(linker, "/stack:4294967296")
using namespace std;
struct pnt {
  pnt() {}
  ~pnt() {}
  pnt(double&& _x, double&& _y) {
    x = _x;
    y = _y;
  }
  double x, y;
};
const double eps = 0.000001;
const long double PI = 3.1415926535897932384626433832795L;
inline bool eq(double&& x, double&& y) { return fabs((x) - (y)) < eps; }
inline bool less(double&& x, double&& y) { return (x) < (y)-eps; }
inline bool more(double&& x, double&& y) { return (x) > (y) + eps; }
int main() {
  cin.tie(0);
  cin.sync_with_stdio(0);
  cout.sync_with_stdio(0);
  int n, m, k;
  cin >> n >> m >> k;
  long long full[301][301], dp[301][301];
  long long inf = numeric_limits<long long>::max() / 2;
  for (register int(i) = (0); ((0) <= (n) ? (i) <= (n) : (i) >= (n));
       ((0) <= (n) ? (i)++ : (i)--))
    for (register int(j) = (0); ((0) <= (n) ? (j) <= (n) : (j) >= (n));
         ((0) <= (n) ? (j)++ : (j)--))
      full[i][j] = dp[i][j] = inf;
  for (register int(i) = (1); ((1) <= (m) ? (i) <= (m) : (i) >= (m));
       ((1) <= (m) ? (i)++ : (i)--)) {
    long long l, r, c;
    cin >> l >> r >> c;
    full[l][r] = min(full[l][r], c);
  }
  for (register int(i) = (1); ((1) <= (n) ? (i) <= (n) : (i) >= (n));
       ((1) <= (n) ? (i)++ : (i)--))
    for (register int(j) = (1); ((1) <= (n) ? (j) <= (n) : (j) >= (n));
         ((1) <= (n) ? (j)++ : (j)--))
      full[i][j] = min(full[i][j], full[i - 1][j]);
  dp[0][0] = 0;
  for (register int(i) = (1); ((1) <= (n) ? (i) <= (n) : (i) >= (n));
       ((1) <= (n) ? (i)++ : (i)--))
    for (register int(j) = (0); ((0) <= (k) ? (j) <= (k) : (j) >= (k));
         ((0) <= (k) ? (j)++ : (j)--)) {
      dp[i][j] = min(dp[i][j], dp[i - 1][j]);
      for (register int(l) = (0); ((0) <= (j) ? (l) <= (j) : (l) >= (j));
           ((0) <= (j) ? (l)++ : (l)--))
        if (i - l - 1 >= 0 && j - l - 1 >= 0)
          dp[i][j] = min(dp[i][j], dp[i - l - 1][j - l - 1] + full[i - l][i]);
    }
  cout << (dp[n][k] != inf ? dp[n][k] : -1) << endl;
  return 0;
}
