#include <bits/stdc++.h>
using namespace std;
long long minc[305][305];
long long dp[305][305];
long long mmin;
int n, m, k;
int main() {
  mmin = 210000000000000LL;
  scanf("%d%d%d", &n, &m, &k);
  int l, r;
  long long c;
  for (int i = 0; i <= 300; i++) {
    for (int j = 0; j <= 300; j++) {
      minc[i][j] = 210000000000000LL;
      dp[i][j] = 210000000000000LL;
    }
  }
  for (int i = 1; i <= m; i++) {
    scanf("%d%d%I64d", &l, &r, &c);
    for (int i = l; i <= r; i++) {
      for (int j = i; j <= r; j++) {
        minc[i][j] = min(minc[i][j], c);
      }
    }
  }
  for (int i = 0; i <= n; i++) {
    dp[i][0] = 0;
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i; j++) {
      if (n - i + j + 2 < k) continue;
      dp[i][j] = dp[i - 1][j];
      for (int k = 1; k <= j; k++) {
        if (minc[i - k + 1][i] != 210000000000000LL)
          dp[i][j] = min(dp[i][j], dp[i - k][j - k] + minc[i - k + 1][i]);
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (j >= k) mmin = min(mmin, dp[i][j]);
    }
  }
  if (mmin != 210000000000000LL)
    cout << mmin << endl;
  else
    cout << -1 << endl;
}
