#include <bits/stdc++.h>
using namespace std;
const int N = 305;
const int lg = 20;
const int mod = 1e9 + 7;
long long dp[N][N], f[N][N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  if (fopen("RGAME.inp", "r")) {
    freopen("RGAME.inp", "r", stdin);
    freopen("RGAME.out", "w", stdout);
  }
  long long n, m, d;
  cin >> n >> m >> d;
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= n; j++) {
      dp[i][j] = 1e18;
    }
  }
  for (int i = 1; i <= m; i++) {
    long long l, r, c;
    cin >> l >> r >> c;
    dp[l][r] = min(dp[l][r], c);
    for (int j = l; j <= r; j++) {
      dp[l][j] = min(dp[l][j], dp[l][r]);
      dp[j][r] = min(dp[j][r], dp[l][r]);
    }
  }
  for (int len = 2; len <= n; len++) {
    for (int l = 1; (l + len - 1) <= n; l++) {
      long long r = l + len - 1;
      for (int k = l + 1; k <= r; k++) {
        dp[l][r] = min(dp[l][r], dp[l][k - 1] + dp[k][r]);
      }
    }
  }
  for (int i = 0; i <= n; i++) {
    for (int k = 0; k <= d; k++) {
      f[i][k] = 1e18;
    }
  }
  long long ans = 1e18;
  for (int i = 0; i <= n; i++) f[i][0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i; j++) {
      for (int k = 0; k <= d; k++) {
        f[i][k] = min(f[i][k], f[j - 1][k]);
        if (k >= (i - j + 1))
          f[i][k] = min(f[i][k], f[j - 1][k - (i - j + 1)] + dp[j][i]);
      }
    }
    ans = min(ans, f[i][d]);
  }
  if (ans < 1e18)
    cout << ans;
  else
    cout << -1;
}
