#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 301;
const long long INF = (long long)1 << 60;
int n, m, k;
long long cost[MAX_N][MAX_N], dp[MAX_N][MAX_N];
void solve() {
  for (int i = 0; i <= n; ++i) {
    for (int j = n; j >= i; --j) {
      cost[i + 1][j] = min(cost[i][j], cost[i + 1][j]);
      if (j > 0) cost[i][j - 1] = min(cost[i][j], cost[i][j - 1]);
    }
  }
  for (int i = 0; i <= n; ++i) fill(dp[i], dp[i] + n + 1, INF);
  dp[0][0] = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= i; ++j) {
      dp[i][j] = dp[i - 1][j];
      for (int k = 0; k < i; ++k) {
        if (dp[k][j - i + k] != INF && cost[k][i] != INF)
          dp[i][j] = min(dp[i][j], dp[k][j - i + k] + cost[k][i]);
      }
    }
  }
  long long ret = INF;
  for (int i = k; i <= n; ++i) ret = min(ret, dp[n][i]);
  if (INF == ret)
    puts("-1");
  else
    cout << ret << endl;
}
int main() {
  cin >> n >> m >> k;
  for (int i = 0; i <= n; ++i) fill(cost[i], cost[i] + n + 1, INF);
  for (int i = 0; i < m; ++i) {
    long long l, r, c;
    cin >> l >> r >> c;
    if (l > r) swap(l, r);
    cost[l - 1][r] = min(cost[l - 1][r], c);
  }
  solve();
  return 0;
}
