#include <bits/stdc++.h>
using namespace std;
const long long maxN = 3e2 + 2, N = 1e5 + 7, MOD = 1e9 + 7, Mod = 1e9 + 6,
                INF = 1LL << 56;
long long n, m, k, x, y, z, dp[maxN][maxN], ans[maxN][maxN];
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) dp[i][j] = INF, ans[i][j] = INF;
  }
  for (int i = 1; i <= m; i++) cin >> x >> y >> z, dp[x][y] = min(dp[x][y], z);
  for (long long i = n; i >= 1; i--) {
    for (long long j = n; j >= 1; j--)
      dp[i + 1][j] = min(dp[i + 1][j], dp[i][j]),
             dp[i][j - 1] = min(dp[i][j], dp[i][j - 1]);
  }
  for (int len = 1; len <= n - 1; len++) {
    for (int i = 1; i <= n - len; i++) {
      long long j = len - i;
      for (int u = i; u <= j; u++)
        dp[i][j] = min(dp[i][u] + dp[u + 1][j], dp[i][j]);
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= i; j++) {
      if (i != 1) ans[i][j] = min(ans[i][j], ans[i - 1][j]);
      for (int u = 1; u <= j; u++)
        ans[i][j] = min(ans[i - u][j - u] + dp[i - u + 1][i], ans[i][j]);
    }
  }
  if (ans[n][k] == INF) return cout << "-1\n", 0;
  return cout << ans[n][k] << "\n", 0;
}
