#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m, k;
  cin >> n >> m >> k;
  long long inf = (1ll << 40);
  long long cost[n + 1][n + 1];
  for (int i = 1; i <= n; ++i)
    for (int j = i; j <= n; ++j) cost[i][j] = inf;
  int l, r, c;
  while (m--) {
    cin >> l >> r >> c;
    cost[l][r] = min(cost[l][r], (long long)c);
  }
  for (int i = 1; i <= n; ++i)
    for (int j = n - 1; j >= i; --j)
      cost[i][j] = min(cost[i][j], cost[i][j + 1]);
  for (int i = 2; i <= n; ++i)
    for (int j = n; j >= i; --j) cost[i][j] = min(cost[i][j], cost[i - 1][j]);
  long long dp[n + 1][k + 1];
  dp[0][0] = 0;
  for (int i = 1; i <= n; ++i) {
    dp[i][0] = 0;
    for (int j = 1; j <= min(i, k); ++j) {
      dp[i][j] = (j < i ? dp[i - 1][j] : inf);
      for (int l = 1; l <= j; ++l)
        dp[i][j] = min(dp[i][j], dp[i - l][j - l] + cost[i - l + 1][i]);
    }
  }
  cout << (dp[n][k] < inf ? dp[n][k] : -1);
  return 0;
}
