#include <bits/stdc++.h>
using namespace std;
const int N = 305;
const long long inf = 1e15;
int n, m, k;
long long dp[N][N], cost[N][N];
long long solve(int pos, int need) {
  if (pos == n + 1) return (need >= k) ? 0ll : inf;
  long long &ret = dp[pos][need];
  if (ret != -1) return ret;
  ret = inf;
  for (int i = pos; i <= n; i++)
    ret = min(ret, cost[pos][i] + solve(i + 1, need + i - pos + 1));
  ret = min(ret, solve(pos + 1, need));
  return ret;
}
int main() {
  memset(dp, -1, sizeof dp);
  memset(cost, 127, sizeof cost);
  cin >> n >> m >> k;
  for (int i = 0; i < m; i++) {
    long long x, y, z;
    cin >> x >> y >> z;
    cost[x][y] = min(cost[x][y], z);
  }
  for (int i = 1; i <= n; i++)
    for (int j = i; j <= n; j++) {
      if (cost[i][j] > inf) cost[i][j] = inf;
      for (int k = 1; k <= i; k++) cost[i][j] = min(cost[i][j], cost[k][j]);
    }
  if (solve(0, 0) >= inf)
    puts("-1");
  else
    cout << solve(0, 0) << endl;
  return 0;
}
