#include <bits/stdc++.h>
using namespace std;
const long long INF = 0x3f3f3f3f3f3f3f3f;
long long dp[305][305], cost[305][305];
int main() {
  ios::sync_with_stdio(false);
  memset(dp, 0x3f, sizeof(dp));
  memset(cost, 0x3f, sizeof(cost));
  int N, M, K, L, R;
  long long C;
  cin >> N >> M >> K;
  while (M--) {
    cin >> L >> R >> C;
    cost[L][R] = min(cost[L][R], C);
  }
  dp[0][0] = 0;
  for (int i = 1; i <= N; ++i) {
    for (int j = N; j >= i; --j) {
      cost[i][j] = min(cost[i][j], min(cost[i - 1][j], cost[i][j + 1]));
    }
  }
  for (int i = 1; i <= N; ++i) {
    for (int j = 0; j <= i; ++j) {
      dp[i][j] = min(dp[i][j], dp[i - 1][j]);
      for (int k = 1; k <= j; ++k) {
        dp[i][j] = min(dp[i][j], dp[i - k][j - k] + cost[i - k + 1][i]);
      }
    }
  }
  if (dp[N][K] == INF)
    cout << -1 << endl;
  else
    cout << dp[N][K] << endl;
  return 0;
}
