#include <bits/stdc++.h>
using namespace std;
long long a[310][310];
long long dp[310][310];
int n, m, k;
signed main() {
  std::ios::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) a[i][j] = 1e18;
  for (int i = 1; i <= m; i++) {
    int l, r;
    long long c;
    cin >> l >> r >> c;
    a[l][r] = min(a[l][r], c);
    for (int l1 = l; l1 <= r; l1++)
      for (int r1 = l1; r1 <= r; r1++) a[l1][r1] = min(a[l1][r1], c);
  }
  for (int i = 0; i <= n; i++)
    for (int j = 1; j <= n; j++) dp[i][j] = 1e18;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; 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] + a[i - k + 1][i]);
      }
    }
  }
  long long ans = 1e18;
  for (int i = k; i <= n; i++) ans = min(ans, dp[n][i]);
  if (ans == 1e18)
    cout << -1 << endl;
  else
    cout << ans << endl;
  return 0;
}
