Everything is great about Ilya's city, except the roads. The thing is, the only ZooVille road is represented as *n* holes in a row. We will consider the holes numbered from 1 to *n*, from left to right.

Ilya is really keep on helping his city. So, he wants to fix at least *k* holes (perharps he can fix more) on a single ZooVille road. 

The city has *m* building companies, the *i*-th company needs *c*<sub class="lower-index">*i*</sub> money units to fix a road segment containing holes with numbers of at least *l*<sub class="lower-index">*i*</sub> and at most *r*<sub class="lower-index">*i*</sub>. The companies in ZooVille are very greedy, so, if they fix a segment containing some already fixed holes, they do not decrease the price for fixing the segment. 

Determine the minimum money Ilya will need to fix at least *k* holes.
The first line contains three integers *n*, *m*, *k* (1 ≤ *n* ≤ 300, 1 ≤ *m* ≤ 10<sup class="upper-index">5</sup>, 1 ≤ *k* ≤ *n*). The next *m* lines contain the companies' description. The *i*-th line contains three integers *l*<sub class="lower-index">*i*</sub>, *r*<sub class="lower-index">*i*</sub>, *c*<sub class="lower-index">*i*</sub> (1 ≤ *l*<sub class="lower-index">*i*</sub> ≤ *r*<sub class="lower-index">*i*</sub> ≤ *n*, 1 ≤ *c*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>).
from collections import deque
import math

mod = 10**9 + 7
fact = [1] * (2*10**5+10)
inf = 10**18

def gcd(a, b):
    while a > 0 and b > 0:
        if a >= b:
            a %= b
        else:
            b %= a
    return max(a, b)

def nok(a, b):
    return a * b // gcd(a, b)

def is_prime(a):
    for i in range(2, int(a**(1/2)) + 1):
        if a % i == 0:
            return False
    return True

def razl(a):
    res = []
    for i in range(2, int(a**(1/2)) + 1):
        while a % i == 0:
            res.append(i)
            a //= i
    if a != 1:
        res.append(a)
    return res

def is_prime_big(a):
    if pow(a-1, a-1, a) == 1:
        return True
    else:
        return False
def get_ret(n, mod):
    return pow(n, mod-2, mod)

for i in range(2, len(fact)):
    fact[i] = (fact[i-1] * i) % mod

def ck(n, k):
    return fact[n] * get_ret(fact[n-k] * fact[k])

def prog(start, finish, d):
    kol = (finish - start) // d + 1
    return (start + finish) * kol // 2

def to_bin(a):
    res = []
    while a > 0:
        res.append(a % 2)
        a //= 2
    res.reverse()
    return res

def to_dec(a):
    return sum([a[i] * pow(2, len(a) - i - 1) for i in range(len(a))])

def I():
    return int(input())

def II():
    return [int(i) for i in input().split()]

def IS():
    return [int(i) for i in input()]

def main():
    n, m, k = II()
    comp, dp = {i:[] for i in range(n)}, [[inf for j in range(n+1)] for i in range(n+1)]

    for i in range(m):
        li, ri, ci = II()
        comp[li-1].append([ri-1, ci])

    for i in range(n+1):
        dp[i][0] = 0

    for i in list(comp.keys()):
        for j in range(1, n+1):
            for l in range(len(comp[i])):
                r, c = comp[i][l][0], comp[i][l][1]
                lenght = r - i + 1
                if j >= lenght:
                    for z in range(i+1):
                        dp[r+1][j] = min(dp[r+1][j], dp[z][j-lenght] + c)

    ans = inf
    # for i in range(n):
    #     for j in range(n+1):
    #         if dp[i][j] == inf:
    #             print("inf", end=' ')
    #         else:
    #             print(dp[i][j], end=' ')
    #     print()
    for i in range(n):
        for j in range(k, n+1):
            ans = min(ans, dp[i][j])
    if ans == inf:
        print(-1)
    else:
        print(ans)




if __name__ == "__main__":
    main()

