#include<cstdio>#include<queue>#include<set>#include<cstdlib>#include<string.h>#include<string>#include<iostream>#include<cmath>#include<map>#include<algorithm>#defineendl"\n"#defineIOSios::sync_with_stdio(0), cin.tie(0),cout.tie(0)#defineftfirst#definesdsecond#definepllpair<ll, ll>#definepiipair<int,int>#definelllonglongint#definemt(a,b)memset(a, b,sizeof a)//#define int long longconstint inf =0x3f3f3f3f;constint INF =0x7fffffff;usingnamespace std;constint N =2e5+7, M =1e6;int a[400], v[400];intmain(){
IOS;int m, t, r; cin >> m >> t >> r;for(int i =0; i < m; i++) cin >> a[i];if(t < r){
cout <<-1<< endl;return0;}int ans =0;for(int i =0; i < m; i++){int now = r;for(int j =0; j < ans; j++)if(a[i]- v[j]<= t && now >0)
now--;for(int j = now; j >0; j--)
v[ans++]= a[i]- j;}
cout << ans << endl;return0;}