#include <bits/stdc++.h>
using namespace std;
long long cost[310][310], dp[310][310];
int n, m, k, x, y;
long long z, big = 1000000000000000000LL;
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n; j++) {
      cost[i][j] = big;
      dp[i][j] = big;
    }
  dp[0][0] = 0;
  for (int i = 1; i <= m; i++) {
    scanf("%d%d%I64d", &x, &y, &z);
    for (int j = x; j <= y; j++) cost[x][j] = min(cost[x][j], z);
  }
  for (int i = 1; i <= n; i++)
    for (int j = 0; j <= i; j++) {
      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]);
    }
  long long ans = big;
  for (int i = k; i <= n; i++)
    for (int j = k; j <= i; j++) ans = min(ans, dp[i][j]);
  if (ans == big) ans = -1;
  printf("%I64d\n", ans);
  return 0;
}
