#include <bits/stdc++.h>
using namespace std;
long long dp[330][330], cost[330][330];
int main() {
  int n, m, K;
  int l, r, c;
  scanf("%d%d%d", &n, &m, &K);
  for (int i = 0; i < 330; ++i)
    for (int j = 0; j < 330; ++j) dp[i][j] = cost[i][j] = (1LL << 50);
  for (int i = 0; i < m; ++i) {
    scanf("%d%d%d", &l, &r, &c);
    cost[l][r] = min(cost[l][r], c + 0LL);
  }
  for (int j = 1; j <= n; ++j)
    for (int i = 1; i < j; ++i)
      cost[i + 1][j] = min(cost[i + 1][j], cost[i][j]);
  for (int i = n; i >= 1; --i)
    for (int j = n; j > i; --j)
      cost[i][j - 1] = min(cost[i][j - 1], cost[i][j]);
  dp[0][0] = 0;
  long long ans = (1LL << 50);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= i; ++j) {
      for (int k = 0; k < j; ++k) {
        dp[i][k + i - j + 1] =
            min(dp[i][k + i - j + 1], dp[j - 1][k] + cost[j][i]);
        if (k + i - j + 1 >= K) ans = min(ans, dp[i][k + i - j + 1]);
      }
    }
    for (int k = 0; k < i; ++k) {
      dp[i][k] = min(dp[i][k], dp[i - 1][k]);
    }
  }
  if (ans == (1LL << 50)) ans = -1;
  cout << ans << endl;
}
