#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3")
using namespace std;
inline void opting() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
}
int inp() {
  int x;
  cin >> x;
  return x;
}
void make_unique(vector<int> &vec, bool sorted = false) {
  if (sorted) sort((vec).begin(), (vec).end());
  vec.resize(unique((vec).begin(), (vec).end()) - vec.begin());
}
void file_edit(bool reader = true, bool writer = false) {
  if (reader) freopen("Test_input.txt", "r", stdin);
  if (writer) freopen("Test_output.txt", "w", stdout);
}
const int SQRT = 65, lg = 60 + 2, inlim = 2147483647, baser = 1e5 + 5;
const long long maxn = 500, inf = 1e9 + 420, delta = 1e9 + 7,
                INF = 0x0123456789ABCDEFLL;
long long dp[maxn][maxn];
long long d[maxn][maxn];
long long n, m, k, a, b, c;
int main() {
  opting();
  long long ans = 0;
  cin >> n >> m >> k;
  fill(d[0], d[n + 1], INF);
  for (int i = 0; i < m; ++i) {
    cin >> a >> b >> c;
    a--;
    d[a][b] = min(d[a][b], c);
  }
  for (int i = 0; i <= n; ++i)
    for (int j = 1; j <= n; ++j) d[j][i] = min(d[j][i], d[j - 1][i]);
  while (0) {
    int l, r;
    cin >> l >> r;
    cout << d[l][r] << endl;
  }
  fill(dp[0], dp[n + 1], INF);
  for (int i = 0; i < n; ++i) {
    dp[i][0] = 0;
    for (int j = 0; j <= i; ++j) {
      if (dp[i][j] == INF) continue;
      dp[i + 1][j] = min(dp[i + 1][j], dp[i][j]);
      for (int k = i + 1; k <= n; ++k)
        dp[k][j + (k - i)] = min(dp[k][j + (k - i)], dp[i][j] + d[i][k]);
    }
  }
  ans = *min_element(dp[n] + k, dp[n + 1]);
  if (ans == INF) ans = -1;
  cout << ans << endl;
}
