#include <bits/stdc++.h>
using namespace std;
long long dp[310][310], cost[310][310];
int main() {
  int m, n, K, l, r, c;
  scanf("%d%d%d", &n, &m, &K);
  memset(dp, 0x3f, sizeof(dp));
  memset(cost, 0x3f, sizeof(cost));
  for (int i = 0; i < m; ++i) {
    scanf("%d%d%d", &l, &r, &c);
    cost[l][r] = min(cost[l][r], 1LL * c);
  }
  for (int i = 1; i < n; ++i)
    for (int j = i + 1; j <= n; ++j)
      cost[i + 1][j] = min(cost[i + 1][j], cost[i][j]);
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j)
      cost[i][j - 1] = min(cost[i][j - 1], cost[i][j]);
  long long ans = 1LL << 60;
  dp[0][0] = 0;
  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 <= i; ++k) {
        dp[i][j] = min(dp[i][j], dp[i - k][j - k] + cost[i - k + 1][i]);
      }
      if (j >= K)
        if (ans > dp[i][j]) ans = dp[i][j];
    }
  }
  if (ans == 1LL << 60) ans = -1;
  cout << ans << endl;
}
