#pragma GCC optimize(3)
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define ll long long
#define reaD() read()
#define pb push_back
#define mkp make_pair
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(register int i = (k); i >= (j); i--)
#define For(i, k, j) for(register int i = (k); i <= (j); i++)
#define DEBUG fprintf(stderr, "***IAKIOI***\n")
#define CDEBUG cerr << "***IAKIOI***" << endl;
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
inline int read() {
    int num=0,flag=1;char c=' ';
    for(;!isdigit(c);c=getchar()) if(c=='-') flag=-1;
    for(;isdigit(c);num=num*10+c-48,c=getchar());
    return num*flag;
}
const int MAXN = 400005;
struct Line {
	int l, r;
	bool operator < (const Line b) const {return l < b.l;}
}p[MAXN];
int a[9][MAXN], disc[MAXN], dcnt = 0, n, m, K, t, used[MAXN], id[9][MAXN], mst[MAXN], f[MAXN][1 << 9];
void init() {
	sort(disc + 1, disc + 1 + dcnt);
	t = unique(disc + 1, disc + 1 + dcnt) - disc - 1;
	For(i, 1, n) {
		p[i].l = lower_bound(disc + 1, disc + 1 + t, p[i].l) - disc;
		p[i].r = lower_bound(disc + 1, disc + 1 + t, p[i].r) - disc;
	}

}
signed main()
{
	cin >> n >> m >> K;
	For(i, 1, n)
		p[i].l = read(), p[i].r = read(), disc[++dcnt] = p[i].l, disc[++dcnt] = p[i].r;
	init();
	sort(p + 1, p + 1 + n);
	For(i, 0, K-1) {
		int lst = 0, cnt = 0;
		For(j, 1, n) {
			if(!used[j] && p[j].l > lst) {
				lst = p[j].r; used[j] = 1;
				a[i][++cnt] = j;
				For(k, p[j].l, p[j].r)
					id[i][k] = cnt;
			}
		}
	}
	For(j, 1, t)
		For(i, 0, K-1)
			mst[j] |= (1 << i) * (id[i][j] != 0);
//	For(j, 1, t) {
//		cout << mst[j] << endl;
//	}
	For(i, 1, t) {
		For(st, 0, (1 << K) - 1) {
			if(st & mst[i] != mst[i]) continue;
			int adt = (__builtin_popcount(st) & 1);
			f[i][st] = f[i-1][st & mst[i-1]] + adt;
		}
	}
	int res = 0;
	For(st, 0, (1 << K) - 1) ckmax(res, f[t][st]);
	cout << res << endl;
    return 0;
}


#pragma GCC optimize(3)
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define ll long long
#define reaD() read()
#define pb push_back
#define mkp make_pair
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(register int i = (k); i >= (j); i--)
#define For(i, k, j) for(register int i = (k); i <= (j); i++)
#define DEBUG fprintf(stderr, "***IAKIOI***\n")
#define CDEBUG cerr << "***IAKIOI***" << endl;
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
inline int read() {
    int num=0,flag=1;char c=' ';
    for(;!isdigit(c);c=getchar()) if(c=='-') flag=-1;
    for(;isdigit(c);num=num*10+c-48,c=getchar());
    return num*flag;
}
const int MAXN = 400005;
struct Line {
	int l, r;
	bool operator < (const Line b) const {return l != b.l ? l < b.l : r < b.r;}
}p[MAXN];
int disc[MAXN], dcnt = 0, n, m, K, t, used[MAXN], id[9][MAXN], ed[9][MAXN], mst[MAXN], mask[MAXN], f[2][1 << 9];
int siz[MAXN], adt[1 << 9];
void init() {
	sort(disc + 1, disc + 1 + dcnt);
	t = unique(disc + 1, disc + 1 + dcnt) - disc - 1;
	For(i, 1, n) {
		p[i].l = lower_bound(disc + 1, disc + 1 + t, p[i].l) - disc;
		siz[p[i].l] = disc[p[i].l] - disc[p[i].l-1];
		p[i].r = lower_bound(disc + 1, disc + 1 + t, p[i].r) - disc;
		siz[p[i].r] = disc[p[i].r] - disc[p[i].r-1];
	}
	For(i, 1, t) siz[i] = disc[i] - disc[i-1];
}
signed main()
{
	cin >> n >> m >> K;
	For(i, 1, n)
		p[i].l = read(), p[i].r = read(), disc[++dcnt] = p[i].l, disc[++dcnt] = p[i].r, disc[++dcnt] = max(p[i].l - 1, 1);
	init();
	sort(p + 1, p + 1 + n);
//	For(i, 1, n)
//		printf("%d %d\n", p[i].l, p[i].r);
//	For(i, 1, t)
//		printf("%d\n", siz[i]);
//	printf("\n");
	For(i, 0, K-1) {
		int lst = 0, cnt = 0;
		For(j, 1, n) {
			if(!used[j] && p[j].l > lst) {
				lst = p[j].r; used[j] = 1; cnt++;
//				cout << j << ' ';
				For(k, p[j].l, p[j].r)
					id[i][k] = cnt;
				ed[i][p[j].r] = 1;
			}
		}
//		cout << endl;
	}

	For(j, 1, t)
		For(i, 0, K-1)
			mst[j] |= (1 << i) * (id[i][j] != 0), mask[j] |= (1 << i) * (ed[i][j] == 1);
//	For(i, 1, t) {
//		printf("%d\n", mst[i]);
//	}
//	puts("");
	For(i, 0, (1 << K) - 1) adt[i] = (__builtin_popcount(i) & 1);
	For(i, 1, t) {
		memset(f[i&1], 0, sizeof(f[i&1]));
		For(j, 0, (1 << K) - 1) {
			if((j | mst[i]) != mst[i]) continue;
			int lst = (j & mst[i-1]) & (mask[i-1] ^ mst[i-1]);
			for(int k = mask[i-1]; k; k = (k - 1) & mask[i-1])
				ckmax(f[i&1][j], f[(i&1)^1][lst | k] + adt[j] * siz[i]);
			ckmax(f[i&1][j], f[(i&1)^1][lst] + adt[j] * siz[i]) ;
		}
//		For(j, 0, (1 << K) - 1) {
//			printf("%d ", f[i&1][j]);
//		}
//		printf("\n");
	}
	int res = 0;
	For(j, 0, (1 << K) - 1) ckmax(res, f[t&1][j]);
	cout << res << endl;
    return 0;
}

 /*
3 6 3
1 1
2 5
5 6

1 5 1
3 5
 */


#pragma GCC optimize(3)
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define ll long long
#define reaD() read()
#define pb push_back
#define mkp make_pair
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(register int i = (k); i >= (j); i--)
#define For(i, k, j) for(register int i = (k); i <= (j); i++)
#define DEBUG fprintf(stderr, "***IAKIOI***\n")
#define CDEBUG cerr << "***IAKIOI***" << endl;
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
inline int read() {
    int num=0,flag=1;char c=' ';
    for(;!isdigit(c);c=getchar()) if(c=='-') flag=-1;
    for(;isdigit(c);num=num*10+c-48,c=getchar());
    return num*flag;
}
const int MAXN = 400005;
struct Line {
	int l, r;
	bool operator < (const Line b) const {return l < b.l;}
}p[MAXN];
int a[9][MAXN], disc[MAXN], dcnt = 0, n, m, K, t, used[MAXN], id[9][MAXN], ed[9][MAXN], mst[MAXN], mask[MAXN], f[2][1 << 9];
int siz[MAXN];
void init() {
	sort(disc + 1, disc + 1 + dcnt);
	t = unique(disc + 1, disc + 1 + dcnt) - disc - 1;
	For(i, 1, n) {
		p[i].l = lower_bound(disc + 1, disc + 1 + t, p[i].l) - disc;
		siz[p[i].l] = disc[p[i].l] - disc[p[i].l-1];
		p[i].r = lower_bound(disc + 1, disc + 1 + t, p[i].r) - disc;
		siz[p[i].r] = disc[p[i].r] - disc[p[i].r-1];
	}
}
signed main()
{
	cin >> n >> m >> K;
	For(i, 1, n)
		p[i].l = read(), p[i].r = read(), disc[++dcnt] = p[i].l, disc[++dcnt] = p[i].r;
	init();
	sort(p + 1, p + 1 + n);
	For(i, 0, K-1) {
		int lst = 0, cnt = 0;
		For(j, 1, n) {
			if(!used[j] && p[j].l > lst) {
				lst = p[j].r; used[j] = 1;
				a[i][++cnt] = j;
				For(k, p[j].l, p[j].r)
					id[i][k] = cnt;
				ed[i][p[j].r] = 1;
			}
		}
	}
	For(j, 1, t)
		For(i, 0, K-1)
			mst[j] |= (1 << i) * (id[i][j] != 0), mask[j] |= (1 << i) * (ed[i][j] != 0);
	For(i, 1, t) {
		memset(f[i&1], 0, sizeof(f[i&1]));
		For(j, 0, (1 << K) - 1) {
			if((j | mst[i]) != mst[i]) continue;
			int lst = (j & mst[i-1]);
			for(int k = mask[i-1]; k; k = (k - 1) & mask[i-1]) {
				ckmax(f[i&1][j], f[(i&1)^1][lst | k] + (__builtin_popcount(j) & 1));
			}
			ckmax(f[i&1][j], f[(i&1)^1][lst] + (__builtin_popcount(j) & 1) * siz[i]) ;
		}
//		For(j, 0, (1 << K) - 1) {
//			printf("%d ", f[i&1][j]);
//		}
//		printf("\n");
	}
	int res = 0;
	For(j, 0, (1 << K) - 1) ckmax(res, f[t&1][j]);
	cout << res << endl;
    return 0;
}

 /*
 1 1000 1
1 1000
 */


#pragma GCC optimize(3)
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define ll long long
#define reaD() read()
#define pb push_back
#define mkp make_pair
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(register int i = (k); i >= (j); i--)
#define For(i, k, j) for(register int i = (k); i <= (j); i++)
#define DEBUG fprintf(stderr, "***IAKIOI***\n")
#define CDEBUG cerr << "***IAKIOI***" << endl;
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
inline int read() {
    int num=0,flag=1;char c=' ';
    for(;!isdigit(c);c=getchar()) if(c=='-') flag=-1;
    for(;isdigit(c);num=num*10+c-48,c=getchar());
    return num*flag;
}
const int MAXN = 400005;
struct Line {
	int l, r;
	bool operator < (const Line b) const {return l != b.l ? l < b.l : r < b.r;}
}p[MAXN];
int a[9][MAXN], disc[MAXN], dcnt = 0, n, m, K, t, used[MAXN], id[9][MAXN], ed[9][MAXN], mst[MAXN], mask[MAXN], f[2][1 << 9];
int siz[MAXN], adt[1 << 9];
void init() {
	sort(disc + 1, disc + 1 + dcnt);
	t = unique(disc + 1, disc + 1 + dcnt) - disc - 1;
	For(i, 1, n) {
		p[i].l = lower_bound(disc + 1, disc + 1 + t, p[i].l) - disc;
		siz[p[i].l] = disc[p[i].l] - disc[p[i].l-1];
		p[i].r = lower_bound(disc + 1, disc + 1 + t, p[i].r) - disc;
		siz[p[i].r] = disc[p[i].r] - disc[p[i].r-1];
	}
}
signed main()
{
	cin >> n >> m >> K;
	For(i, 1, n)
		p[i].l = read(), p[i].r = read(), disc[++dcnt] = p[i].l, disc[++dcnt] = p[i].r;
	init();
	sort(p + 1, p + 1 + n);
	For(i, 0, K-1) {
		int lst = 0, cnt = 0;
		For(j, 1, n) {
			if(!used[j] && p[j].l > lst) {
				lst = p[j].r; used[j] = 1;
				a[i][++cnt] = j;
				For(k, p[j].l, p[j].r)
					id[i][k] = cnt;
				ed[i][p[j].r] = 1;
			}
		}
	}
	For(i, 1, n)
		assert(used[i] == 1);
	For(j, 1, t)
		For(i, 0, K-1)
			mst[j] |= (1 << i) * (id[i][j] != 0), mask[j] |= (1 << i) * (ed[i][j] != 0);
	For(i, 0, (1 << K) - 1) adt[i] = __builtin_popcount(i) & 1;
	For(i, 1, t) {
		memset(f[i&1], 0, sizeof(f[i&1]));
		For(j, 0, (1 << K) - 1) {
			if((j | mst[i]) != mst[i]) continue;
			int lst = (j & mst[i-1]);
			for(int k = mask[i-1]; k; k = (k - 1) & mask[i-1]) {
				ckmax(f[i&1][j], f[(i&1)^1][lst | k] + adt[i] * siz[i]);
			}
			ckmax(f[i&1][j], f[(i&1)^1][lst] + adt[i] * siz[i]) ;
		}
//		For(j, 0, (1 << K) - 1) {
//			printf("%d ", f[i&1][j]);
//		}
//		printf("\n");
	}
	int res = 0;
	For(j, 0, (1 << K) - 1) ckmax(res, f[t&1][j]);
	cout << res << endl;
    return 0;
}

 /*
 1 1000 1
1 1000
 */


#pragma GCC optimize(3)
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define ll long long
#define reaD() read()
#define pb push_back
#define mkp make_pair
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(register int i = (k); i >= (j); i--)
#define For(i, k, j) for(register int i = (k); i <= (j); i++)
#define DEBUG fprintf(stderr, "***IAKIOI***\n")
#define CDEBUG cerr << "***IAKIOI***" << endl;
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
inline int read() {
    int num=0,flag=1;char c=' ';
    for(;!isdigit(c);c=getchar()) if(c=='-') flag=-1;
    for(;isdigit(c);num=num*10+c-48,c=getchar());
    return num*flag;
}
const int MAXN = 400005;
struct Line {
	int l, r;
	bool operator < (const Line b) const {return l < b.l;}
}p[MAXN];
int a[9][MAXN], disc[MAXN], dcnt = 0, n, m, K, t, used[MAXN], id[9][MAXN], mst[MAXN], f[2][1 << 9];
void init() {
	sort(disc + 1, disc + 1 + dcnt);
	t = unique(disc + 1, disc + 1 + dcnt) - disc - 1;
	For(i, 1, n) {
		p[i].l = lower_bound(disc + 1, disc + 1 + t, p[i].l) - disc;
		p[i].r = lower_bound(disc + 1, disc + 1 + t, p[i].r) - disc;
	}

}
signed main()
{
	cin >> n >> m >> K;
	For(i, 1, n)
		p[i].l = read(), p[i].r = read(), disc[++dcnt] = p[i].l, disc[++dcnt] = p[i].r;
	init();
	sort(p + 1, p + 1 + n);
	For(i, 0, K-1) {
		int lst = 0, cnt = 0;
		For(j, 1, n) {
			if(!used[j] && p[j].l > lst) {
				lst = p[j].r; used[j] = 1;
				a[i][++cnt] = j;
				For(k, p[j].l, p[j].r)
					id[i][k] = cnt;
			}
		}
	}
	For(j, 1, t)
		For(i, 0, K-1)
			mst[j] |= (1 << i) * (id[i][j] != 0);
//	For(j, 1, t) {
//		cout << mst[j] << endl;
//	}
	For(i, 1, t) {
		memset(f[i&1], 0, sizeof(f[i&1]));
		For(st, 0, (1 << K) - 1) {
			if(st & mst[i] != mst[i]) continue;
			int adt = (__builtin_popcount(st) & 1);
			f[i&1][st] = f[(i&1)^1][st & mst[i-1]] + adt;
		}
	}
	int res = 0;
	For(st, 0, (1 << K) - 1) ckmax(res, f[t&1][st]);
	cout << res << endl;
    return 0;
}


#pragma GCC optimize(3)
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define ll long long
#define reaD() read()
#define pb push_back
#define mkp make_pair
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(register int i = (k); i >= (j); i--)
#define For(i, k, j) for(register int i = (k); i <= (j); i++)
#define DEBUG fprintf(stderr, "***IAKIOI***\n")
#define CDEBUG cerr << "***IAKIOI***" << endl;
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
inline int read() {
    int num=0,flag=1;char c=' ';
    for(;!isdigit(c);c=getchar()) if(c=='-') flag=-1;
    for(;isdigit(c);num=num*10+c-48,c=getchar());
    return num*flag;
}
const int MAXN = 400005;
struct Line {
	int l, r;
	bool operator < (const Line b) const {return l < b.l;}
}p[MAXN];
int a[9][MAXN], disc[MAXN], dcnt = 0, n, m, K, t, used[MAXN], id[9][MAXN], mst[MAXN], f[2][1 << 9];
void init() {
	sort(disc + 1, disc + 1 + dcnt);
	t = unique(disc + 1, disc + 1 + dcnt) - disc - 1;
	For(i, 1, n) {
		p[i].l = lower_bound(disc + 1, disc + 1 + t, p[i].l) - disc;
		p[i].r = lower_bound(disc + 1, disc + 1 + t, p[i].r) - disc;
	}

}
signed main()
{
	cin >> n >> m >> K;
	For(i, 1, n)
		p[i].l = read(), p[i].r = read(), disc[++dcnt] = p[i].l, disc[++dcnt] = p[i].r;
	init();
	sort(p + 1, p + 1 + n);
	For(i, 0, K-1) {
		int lst = 0, cnt = 0;
		For(j, 1, n) {
			if(!used[j] && p[j].l > lst) {
				lst = p[j].r; used[j] = 1;
				a[i][++cnt] = j;
				For(k, p[j].l, p[j].r)
					id[i][k] = cnt;
			}
		}
	}
	For(i, 1, n) assert(used[i] == 1);
	For(j, 1, t)
		For(i, 0, K-1)
			mst[j] |= (1 << i) * (id[i][j] != 0);
	For(i, 1, t) {
		memset(f[i&1], 0, sizeof(f[i&1]));
		For(st, 0, (1 << K) - 1) {
			if(st & mst[i] != mst[i]) continue;
			int adt = (__builtin_popcount(st) & 1);
			f[i&1][st] = f[(i&1)^1][st & mst[i-1]] + adt;
		}
	}
	int res = 0;
	For(st, 0, (1 << K) - 1) if(st & mst[t] == mst[t]) ckmax(res, f[t&1][st]);
	cout << res << endl;
    return 0;
}


#pragma GCC optimize(3)
#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define ll long long
#define reaD() read()
#define pb push_back
#define mkp make_pair
#define mst(a,b) memset(a,b,sizeof(a))
#define foR(i, k, j) for(register int i = (k); i >= (j); i--)
#define For(i, k, j) for(register int i = (k); i <= (j); i++)
#define DEBUG fprintf(stderr, "***IAKIOI***\n")
#define CDEBUG cerr << "***IAKIOI***" << endl;
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0)
const int P = 998244353; //
using namespace std;
inline void ckmax(int &a, int b) {a = max(a, b);}
inline void ckmin(int &a, int b) {a = min(a, b);}
inline void addmod(int &a, int b) {int t = a + b; a = (t >= P ? t - P : t); }
inline int ksm(int a, int b) {int ans=1; for(;b;b>>=1) {if(b&1) ans=1ll*ans*a%P;a=1ll*a*a%P;}return ans;}
inline int inv(int a) {return ksm(a, P-2);}
inline int read() {
    int num=0,flag=1;char c=' ';
    for(;!isdigit(c);c=getchar()) if(c=='-') flag=-1;
    for(;isdigit(c);num=num*10+c-48,c=getchar());
    return num*flag;
}
const int MAXN = 400005;
struct Line {
	int l, r;
	bool operator < (const Line b) const {return l != b.l ? l < b.l : r < b.r;}
}p[MAXN];
int a[9][MAXN], disc[MAXN], dcnt = 0, n, m, K, t, used[MAXN], id[9][MAXN], ed[9][MAXN], mst[MAXN], mask[MAXN], f[2][1 << 9];
int siz[MAXN];
void init() {
	sort(disc + 1, disc + 1 + dcnt);
	t = unique(disc + 1, disc + 1 + dcnt) - disc - 1;
	For(i, 1, n) {
		p[i].l = lower_bound(disc + 1, disc + 1 + t, p[i].l) - disc;
		siz[p[i].l] = disc[p[i].l] - disc[p[i].l-1];
		p[i].r = lower_bound(disc + 1, disc + 1 + t, p[i].r) - disc;
		siz[p[i].r] = disc[p[i].r] - disc[p[i].r-1];
	}
}
signed main()
{
	cin >> n >> m >> K;
	For(i, 1, n)
		p[i].l = read(), p[i].r = read(), disc[++dcnt] = p[i].l, disc[++dcnt] = p[i].r;
	init();
	sort(p + 1, p + 1 + n);
	For(i, 0, K-1) {
		int lst = 0, cnt = 0;
		For(j, 1, n) {
			if(!used[j] && p[j].l > lst) {
				lst = p[j].r; used[j] = 1;
				a[i][++cnt] = j;
				For(k, p[j].l, p[j].r)
					id[i][k] = cnt;
				ed[i][p[j].r] = 1;
			}
		}
	}
	For(i, 1, n)
		assert(used[i] == 1);
	For(j, 1, t)
		For(i, 0, K-1)
			mst[j] |= (1 << i) * (id[i][j] != 0), mask[j] |= (1 << i) * (ed[i][j] != 0);
	For(i, 1, t) {
		memset(f[i&1], 0, sizeof(f[i&1]));
		For(j, 0, (1 << K) - 1) {
			if((j | mst[i]) != mst[i]) continue;
			int lst = (j & mst[i-1]);
			for(int k = mask[i-1]; k; k = (k - 1) & mask[i-1]) {
				ckmax(f[i&1][j], f[(i&1)^1][lst | k] + (__builtin_popcount(j) & 1));
			}
			ckmax(f[i&1][j], f[(i&1)^1][lst] + (__builtin_popcount(j) & 1) * siz[i]) ;
		}
//		For(j, 0, (1 << K) - 1) {
//			printf("%d ", f[i&1][j]);
//		}
//		printf("\n");
	}
	int res = 0;
	For(j, 0, (1 << K) - 1) ckmax(res, f[t&1][j]);
	cout << res << endl;
    return 0;
}

 /*
 1 1000 1
1 1000
 */


#include <vector>
#include <algorithm>
#include <cstdio>

#define NDEBUG
#include <cassert>

template <typename Tp>
void read(Tp &res){
	static char ch; ch = getchar(), res = 0;
	while(ch < '0' || ch > '9') ch = getchar();
	while(ch >= '0' && ch <= '9') res = res * 10 + ch - 48, ch = getchar();
}

const int MAXN = 1e5 + 19, INF = 0x3f3f3f3f;

int n, m, k, tmp[MAXN * 2], tot, cnt[1 << 8], l[MAXN], r[MAXN], dp[MAXN * 2][1 << 8];
std::vector<int> inclusion[MAXN * 2];

int main(){
	read(n), read(m), read(k);
	for(int i = 1; i <= n; ++i){
		read(l[i]), read(r[i]), r[i]++;
		tmp[++tot] = l[i], tmp[++tot] = r[i];
	}
	std::sort(tmp + 1, tmp + 1 + tot), tot = std::unique(tmp + 1, tmp + 1 + tot) - tmp - 1;
	for(int i = 1; i <= n; ++i){
		l[i] = std::lower_bound(tmp + 1, tmp + 1 + tot, l[i]) - tmp;
		r[i] = std::lower_bound(tmp + 1, tmp + 1 + tot, r[i]) - tmp;
		for(int j = l[i]; j < r[i]; ++j)
			inclusion[j].push_back(i);
	}
	for(int i = 0; i < (1 << k); ++i)
		cnt[i] = cnt[i >> 1] + (i & 1);
	for(int i = 1; i < tot; ++i){
		std::sort(inclusion[i].begin(), inclusion[i].end(), [](const int &a, const int &b){return l[a] == r[a] ? a < b : l[a] < l[b];});
		int h = inclusion[i].size(), v = inclusion[i - 1].size(), mk = -1;
		for(int j = 0; j < h; ++j)
			if(l[inclusion[i][j]] < i)
				mk = j;
		for(int j = 0; j < (1 << v); ++j){
			int st = 0, hb = 0;
			for(int k = 0; k < v; ++k)
				if(r[inclusion[i - 1][k]] > i)
					st ^= ((j >> k) & 1) << (hb++);
			assert(hb == mk + 1);
			dp[i][st] = std::max(dp[i][st], dp[i - 1][j]);
		}
		for(int st = 0; st < (1 << (mk + 1)); ++st)
			for(int j = 0; j < (1 << (h - mk - 1)); ++j)
				dp[i][st ^ (j << (mk + 1))] = dp[i][st];
		for(int j = 0; j < (1 << h); ++j)
			if(cnt[j] & 1)
				dp[i][j] += tmp[i + 1] - tmp[i];
	}
	int ans = 0;
	for(int i = 0; i < (1 << k); ++i)
		ans = std::max(ans, dp[tot - 1][i]);
	printf("%d\n", ans);
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#include<vector>
#include<set>
#include<bitset>
#include<cassert>
#define next MabLcdG
#define R register
#define debug puts("wn")
#define chkmax(x, y) (x=max(x, y))
#define chkmin(x, y) (x=min(x, y))
#define pos(x, y) ((x-1)*9+y)
#define mod 10000000071
using namespace std;
typedef int ll;
typedef long double ld;
typedef unsigned long long ull;
typedef double dl;
template<typename T> void read(T &x);
template<typename T> void write(T x);
template<typename T> void writesp(T x);
template<typename T> void writeln(T x);

const ll N=2e5+5, M=1<<9, inf=1e9;

ll n, m, k;

struct node{
	ll pos, id;
	inline bool operator <(const node &X)const{
		return pos==X.pos?id<X.id:pos<X.pos;
	}
}q[N<<1];
ll f[N], s;
ll cnt;
ll vis[9];

inline ll popcount(ll x){
	ll res=0;
	for (; x; x-=x&-x) res^=1;
	return res;
}

int main(){
	read(n); read(m); read(k); s=255;
	for (R ll i=1, x, y; i<=n; i++){
		read(x); read(y);
		q[++cnt]=(node){x, i};
		q[++cnt]=(node){y+1, -i};
	}
	for (R ll i=1; i<=s; i++) f[i]=-inf;
	sort(q+1, q+cnt+1);
	for (R ll i=1, len, pos; i<=cnt; i++){
		len=(i==cnt)?0:q[i+1].pos-q[i].pos;
		if (q[i].id>0){
			for (R ll j=0; j<8; j++){
				if (!vis[j]){
					pos=j;
					vis[j]=q[i].id;
					break;
				}
			}
			for (R ll j=s; ~j; j--){
				if (j>>pos&1){
					f[j]=f[j^(1<<pos)]+len*popcount(j);
				}else f[j]+=len*popcount(j);
			}
		}else {
			for (R ll j=0; j<8; j++){
				if (vis[j]==-q[i].id){
					pos=j;
					vis[j]=0;
					break;
				}
			}
			for (R ll j=0; j<=s; j++){
				if (j>>pos&1) f[j]=-inf;
				else chkmax(f[j], f[j^(1<<pos)])+=len*popcount(j);
			}

		}
	}
	writeln(f[0]);
}
template<typename T> void read(T &x){
	x=0; int t=1;
	char wn=getchar();
	while (wn<'0' || wn>'9'){
		if (wn=='-') t=-1;
		wn=getchar();
	}
	while (wn>='0' && wn<='9'){
		x=x*10+wn-'0'; wn=getchar();
	}
	x*=t;
}
template<typename T> void write(T x){
	if (x<0){putchar('-'); x=-x;}
	if (x<=9){putchar(x+'0'); return;}
	write(x/10); putchar(x%10+'0');
}
template<typename T> void writesp(T x){
	write(x); putchar(' ');
}

template<typename T> void writeln(T x){
	write(x); putchar('\n');
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int64;

signed main(void)
{
	ios::sync_with_stdio(0), cin.tie(0);

	int64 allMagic = 0, m = 0, limit = 0, newMagic = 0;
	cin >> allMagic >> m >> limit;
	vector <int64> magicL(allMagic + 1, 0);
	vector <int64> magicR(allMagic + 1, 0);
	vector <int64> number;
	vector <int64> dp(1 << limit | 1);
	vector <int64> maxValue(1 << limit | 1);
	vector <int64> numberSize;
	vector <int64> magicCovered(allMagic * 5 + 1);
	vector <int64> magicEnd(allMagic * 5 + 1);
	vector <vector <bool>> isMagicCovered(allMagic * 5 + 1);
	vector <vector <bool>> isMagicEnd(allMagic * 5 + 1);
	vector <bool> isUseed(allMagic + 1);

	function <void()> init = [&]()
	{
		for (int64 i = 1; i <= allMagic; ++i)
		{
			cin >> magicL[i] >> magicR[i];
			number.push_back(magicL[i]);
			number.push_back(magicR[i]);
			number.push_back(max(magicL[i] - 1, 1ll));
		}

		sort(number.begin(), number.end());
		newMagic = unique(number.begin(), number.end()) - number.begin();
//		for (int64 g : number)
//			cout << g << '\n';
		for (int64 i = 1; i <= allMagic; ++i)
		{
			magicL[i] = lower_bound(number.begin(), number.begin() + newMagic, magicL[i]) - number.begin() + 1;
			magicR[i] = lower_bound(number.begin(), number.begin() + newMagic, magicR[i]) - number.begin() + 1;
//			cout << magicL[i] << " " << magicR[i] << '\n';
		}

		numberSize.resize(number.size() + 3);
		for (int64 i = 1;i < newMagic; ++i)
		{
			numberSize[i] = number[i] - number[i - 1];
//			cout <<
			//cout << numberSize[i] << '\n';
		} numberSize[newMagic] = 1;
	};

	function <int64(int64)> count = [&](int64 s)
	{
		int64 res = 0;
		while (s > 0)
			res ^= 1, s -= s & -s;
		return res;
	};

	function <void()> solve = [&]()
	{
		for (int64 i = 1;i <= newMagic; ++i)
			isMagicCovered[i].resize(limit + 1),
			isMagicEnd[i].resize(limit + 1);

		for (int64 i = 1; i <= limit; ++i)
		{
			int64 lowest = 0;
			for (int64 j = 1; j <= allMagic; ++j)
			{
				if (isUseed[j] || lowest >= magicL[j])
					continue;
				isUseed[j] = 1;

				for (int64 k = magicL[j]; k <= magicR[j]; ++k)
					isMagicCovered[k][i] = 1;

				isMagicEnd[magicR[j]][i] = 1;
				lowest = magicR[j];
			}
		}

		for (int64 i = 1; i <= newMagic; ++i)
		{
			for (int64 j = 1;j <= limit; ++j)
				magicCovered[i] |= (1 << j - 1) * int64(isMagicCovered[i][j]),
				magicEnd[i] |= (1 << j - 1) * int64(isMagicEnd[i][j]);
//			cout << magicCovered[i] << " " << magicEnd[i] << '\n';
		}

		int64 allBitMakes = 1 << limit;
		vector <int64> f(allBitMakes + 1, 0);
		for (int64 i = 1; i < allBitMakes; ++i)
			f[i] = count(i);
		//	cout << f[i] << '\n';

		for (int64 i = 1; i <= newMagic; ++i)
		{
			for (int64 s = 0; s < allBitMakes; ++s)
			{
				if ((s | magicCovered[i]) != magicCovered[i])
					continue;
				int64 basic = (s & magicCovered[i - 1]) & (magicCovered[i - 1] ^ magicEnd[i - 1]);
				for (int64 k = magicEnd[i - 1]; k; k = (k - 1) & magicEnd[i - 1])
				{
					dp[s] = max(dp[s], maxValue[basic | k] + f[s] * numberSize[i]);
				}

				dp[s] = max(dp[s], maxValue[basic] + f[s] * numberSize[i]);
//				cout << dp[s] << " " << numberSize[i] << '\n';
			}

			for (int64 s = 0;s < allBitMakes; ++s)
				maxValue[s] = dp[s],
				dp[s] = 0;
		}

//		cout << number.size() << '\n';

		cout << *max_element(maxValue.begin(), maxValue.end()) << '\n';
	};

	init();
	solve();

	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#include<vector>
#include<set>
#include<bitset>
#include<cassert>
#define next MabLcdG
#define R register
#define debug puts("wn")
#define chkmax(x, y) (x=max(x, y))
#define chkmin(x, y) (x=min(x, y))
#define pos(x, y) ((x-1)*9+y)
#define mod 10000000071
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef double dl;
template<typename T> void read(T &x);
template<typename T> void write(T x);
template<typename T> void writesp(T x);
template<typename T> void writeln(T x);

const ll N=2e5+5, M=1<<9;

ll n, m, k;

struct node{
	ll pos, id;
	inline bool operator <(const node &X)const{
		return pos<X.pos;
	}
}q[N<<1];
ll f[M], s;
ll cnt;
ll vis[N];

inline ll popcount(ll x){
	ll res=0;
	for (; x; x-=x&-x) res^=1;
	return res;
}

int main(){
	read(n); read(m); read(k); s=511;
	for (R ll i=1, x, y; i<=n; i++){
		read(x); read(y);
		q[++cnt]=(node){x, i};
		q[++cnt]=(node){y+1, -i};
	}
	for (R ll i=1; i<=s; i++) f[i]=-0x7fffffff;
	sort(q+1, q+cnt+1);
	for (R ll i=1, len, pos; i<=cnt; i++){
		len=(i==cnt)?0:q[i+1].pos-q[i].pos;
		if (q[i].id>0){
			for (R ll j=0; j<8; j++){
				if (!vis[j]){
					pos=j;
					vis[j]=q[i].id;
					break;
				}
			}
			for (R ll j=s; ~j; j--){
				if (j>>pos&1){
					f[j]=f[j^(1<<pos)]+len*popcount(j);
				}else f[j]+=len*popcount(j);
			}
		}else {
			for (R ll j=0; j<8; j++){
				if (vis[j]==-q[i].id){
					pos=j;
					vis[j]=0;
					break;
				}
			}
			for (R ll j=0; j<=s; j++){
				if (j>>pos&1) f[j]=-0x7fffffff;
				else chkmax(f[j], f[j^(1<<pos)])+=len*popcount(j);
			}

		}
	}
	writeln(f[0]);
}
template<typename T> void read(T &x){
	x=0; int t=1;
	char wn=getchar();
	while (wn<'0' || wn>'9'){
		if (wn=='-') t=-1;
		wn=getchar();
	}
	while (wn>='0' && wn<='9'){
		x=x*10+wn-'0'; wn=getchar();
	}
	x*=t;
}
template<typename T> void write(T x){
	if (x<0){putchar('-'); x=-x;}
	if (x<=9){putchar(x+'0'); return;}
	write(x/10); putchar(x%10+'0');
}
template<typename T> void writesp(T x){
	write(x); putchar(' ');
}

template<typename T> void writeln(T x){
	write(x); putchar('\n');
}


#include <iostream>
#include <algorithm>

#define parity __builtin_parity
#define lowbit(x) ((x) & -(x))
#define max_3(a, b, c) max(a, std::max(b, c))

const int N = 1000000 + 7, S = 1 << 8 | 7;

int n, m, k;
struct str {
	int x, y;
} a[N];
int b[N];
int e[N], l[N], r[N], z[N];
int f[S], g[S];

int main() {
	scanf("%d%d%d", &n, &m, &k);
	for (int i = 1; i <= n; ++i)
		scanf("%d%d", &a[i].x, &a[i].y), e[i] = --a[i].x, e[i + n] = a[i].y;
	std::sort(e + 1, e + n * 2 + 1);
	m = std::unique(e + 1, e + n * 2 + 1) - e - 1;
	for (int i = 1; i <= n; ++i)
		a[i].x = std::lower_bound(e + 1, e + m + 1, a[i].x) - e,
		a[i].y = std::lower_bound(e + 1, e + m + 1, a[i].y) - e;

	std::sort(a + 1, a + n + 1, [](str a, str b) {
		return a.x != b.x ? a.x < b.x : a.y < b.y;
	});
	for (int j = 1; j <= k; ++j)
		for (int i = 1, l = 0; i <= n; ++i)
			if (!b[i] && l <= a[i].x) b[i] = j, l = a[i].y;

	for (int i = 1; i <= n; ++i)
		if (!b[i]) std::cout << "-";

	const int A = (1 << k) - 1;
	for (int i = 1; i <= n; ++i)
		l[a[i].x] |= 1 << b[i] - 1, r[a[i].y] |= 1 << b[i] - 1;
	for (int i = 1; i <= m; ++i)
		z[i] = z[i - 1] ^ r[i] | l[i];
	for (int i = 1; i <= m; ++i) {
		std::fill(g, g + A + 1, 0);
		for (int j = A, l, u, v; ~j; --j)
			l = r[i] ^ (j & r[i]), u = lowbit(l), v = lowbit(l ^ u),
			g[j] = std::max_3(f[j], g[j ^ u], g[j ^ v]);
		std::fill(f, f + A + 1, 0);
		for (int j = 0; j <= A; ++j)
			if ((z[i] & j) == j)
				f[j] = g[j & ~l[i] & ~r[i]] + parity(j) * (e[i + 1] - e[i]);
	}
	printf("%d", f[0]);

	return 0;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <functional>
#include <iostream>
#include <queue>
#include <cassert>

using namespace std;
typedef long long int64;

int main()
{
	ios::sync_with_stdio(0), cin.tie(0);

	int allMagic = 0, m = 0, limit = 0, newMagic = 0;
	cin >> allMagic >> m >> limit;
	vector <int> magicL(allMagic + 1, 0);
	vector <int> magicR(allMagic + 1, 0);
	vector <int> number;
	vector <int> dp(1 << limit | 1);
	vector <int> maxValue(1 << limit | 1);
	vector <int> numberSize;
	vector <int> magicCovered(allMagic * 5 + 1);
	vector <int> magicEnd(allMagic * 5 + 1);
	vector <vector <bool>> isMagicCovered(allMagic * 5 + 1);
	vector <vector <bool>> isMagicEnd(allMagic * 5 + 1);
	vector <bool> isUseed(allMagic + 1);

	function <void()> init = [&]()
	{
		for (int i = 1; i <= allMagic; ++i)
		{
			cin >> magicL[i] >> magicR[i];
			number.push_back(magicL[i]);
			number.push_back(magicR[i]);
			number.push_back(max(magicL[i] - 1, 1));
		}

		sort(number.begin(), number.end());
		newMagic = unique(number.begin(), number.end()) - number.begin();
//		for (int g : number)
//			cout << g << '\n';
		for (int i = 1; i <= allMagic; ++i)
		{
			magicL[i] = lower_bound(number.begin(), number.begin() + newMagic, magicL[i]) - number.begin() + 1;
			magicR[i] = lower_bound(number.begin(), number.begin() + newMagic, magicR[i]) - number.begin() + 1;
//			cout << magicL[i] << " " << magicR[i] << '\n';
		}

		numberSize.resize(number.size() + 3);
		for (int i = 1;i < newMagic; ++i)
		{
			numberSize[i] = number[i] - number[i - 1];
//			cout <<
			//cout << numberSize[i] << '\n';
		} numberSize[newMagic] = 1;
	};

	function <int(int)> count = [&](int s)
	{
		int res = 0;
		while (s > 0)
			res ^= 1, s -= s & -s;
		return res;
	};

	function <void()> solve = [&]()
	{
		for (int i = 1;i <= newMagic; ++i)
			isMagicCovered[i].resize(limit + 1),
			isMagicEnd[i].resize(limit + 1);

		for (int i = 1; i <= limit; ++i)
		{
			int lowest = 0;
			for (int j = 1; j <= allMagic; ++j)
			{
				if (isUseed[j] || lowest >= magicL[j])
					continue;
				isUseed[j] = 1;

				for (int k = magicL[j]; k <= magicR[j]; ++k)
					isMagicCovered[k][i] = 1;

				isMagicEnd[magicR[j]][i] = 1;
				lowest = magicR[j];
			}
		}

		for (int i = 1; i <= newMagic; ++i)
		{
			for (int j = 1;j <= limit; ++j)
				magicCovered[i] |= (1 << j - 1) * int(isMagicCovered[i][j]),
				magicEnd[i] |= (1 << j - 1) * int(isMagicEnd[i][j]);
//			cout << magicCovered[i] << " " << magicEnd[i] << '\n';
		}

		int allBitMakes = 1 << limit;
		vector <int> f(allBitMakes + 1, 0);
		for (int i = 1; i < allBitMakes; ++i)
			f[i] = count(i);
		//	cout << f[i] << '\n';

		for (int i = 1; i <= newMagic; ++i)
		{
			for (int s = 0; s < allBitMakes; ++s)
			{
				if ((s | magicCovered[i]) != magicCovered[i])
					continue;
				int basic = (s & magicCovered[i - 1]) & (magicCovered[i - 1] ^ magicEnd[i - 1]);
				for (int k = magicEnd[i - 1]; k; k = (k - 1) & magicEnd[i - 1])
				{
					dp[s] = max(dp[s], maxValue[basic | k] + f[s] * numberSize[i]);
				}

				dp[s] = max(dp[s], maxValue[basic] + f[s] * numberSize[i]);
//				cout << dp[s] << " " << numberSize[i] << '\n';
			}

			for (int s = 0;s < allBitMakes; ++s)
				maxValue[s] = dp[s],
				dp[s] = 0;
		}

//		cout << number.size() << '\n';

		cout << *max_element(maxValue.begin(), maxValue.end()) << '\n';
	};

	init();
	solve();

	return 0;
}


#include <cstdio>
#include <algorithm>
#include <vector>
#include <cstring>
#include <functional>
#include <iostream>
#include <queue>
#include <cassert>

using namespace std;
typedef long long int64;

int main()
{
	ios::sync_with_stdio(0), cin.tie(0);

	int allMagic = 0, m = 0, limit = 0, newMagic = 0;
	cin >> allMagic >> m >> limit;
	vector <int> magicL(allMagic + 1, 0);
	vector <int> magicR(allMagic + 1, 0);
	vector <int> number;
	vector <int64> dp(1 << limit | 1);
	vector <int64> maxValue(1 << limit | 1);
	vector <int64> numberSize;
	vector <int> magicCovered(allMagic * 5 + 1);
	vector <int> magicEnd(allMagic * 5 + 1);
	vector <vector <bool>> isMagicCovered(allMagic * 5 + 1);
	vector <vector <bool>> isMagicEnd(allMagic * 5 + 1);
	vector <bool> isUseed(allMagic + 1);

	function <void()> init = [&]()
	{
		number.push_back(0);
		for (int i = 1; i <= allMagic; ++i)
		{
			cin >> magicL[i] >> magicR[i];
			number.push_back(magicL[i]);
			number.push_back(magicR[i]);
			number.push_back(max(magicL[i] - 1, 1));
		}
		sort(number.begin() + 1, number.end());
		newMagic = unique(number.begin() + 1, number.end()) - number.begin() - 1;
//		for (int g : number)
//			cout << g << '\n';
		for (int i = 1; i <= allMagic; ++i)
		{
			magicL[i] = lower_bound(number.begin() + 1, number.begin() + newMagic, magicL[i]) - number.begin() ;
			magicR[i] = lower_bound(number.begin() + 1, number.begin() + newMagic, magicR[i]) - number.begin() ;
//			cout << magicL[i] << " " << magicR[i] << '\n';
		}

		numberSize.resize(number.size() + 3);
		for (int i = 1;i <= newMagic; ++i)
		{
			numberSize[i] = number[i] - number[i - 1];
//			cout <<
			//cout << numberSize[i] << '\n';
		}
	};

	function <int(int)> count = [&](int s)
	{
		int res = 0;
		while (s > 0)
			res ^= 1, s -= s & -s;
		return res;
	};

	function <void()> solve = [&]()
	{
		for (int i = 1;i <= newMagic; ++i)
			isMagicCovered[i].resize(limit + 1),
			isMagicEnd[i].resize(limit + 1);

		for (int i = 1; i <= limit; ++i)
		{
			int lowest = 0;
			for (int j = 1; j <= allMagic; ++j)
			{
				if (isUseed[j] || lowest >= magicL[j])
					continue;
				isUseed[j] = 1;

				for (int k = magicL[j]; k <= magicR[j]; ++k)
					isMagicCovered[k][i] = 1;

				isMagicEnd[magicR[j]][i] = 1;
				lowest = magicR[j];
			}
		}

		for (int i = 1; i <= newMagic; ++i)
		{
			for (int j = 1;j <= limit; ++j)
				magicCovered[i] |= (1 << j - 1) * int(isMagicCovered[i][j]),
				magicEnd[i] |= (1 << j - 1) * int(isMagicEnd[i][j]);
//			cout << magicCovered[i] << " " << magicEnd[i] << '\n';
		}

		int allBitMakes = 1 << limit;
		vector <int> f(allBitMakes + 1, 0);
		for (int i = 1; i < allBitMakes; ++i)
			f[i] = count(i);
		//	cout << f[i] << '\n';

		for (int i = 1; i <= newMagic; ++i)
		{
			for (int s = 0; s < allBitMakes; ++s)
			{
				if ((s | magicCovered[i]) != magicCovered[i])
					continue;
				int basic = (s & magicCovered[i - 1]) & (magicCovered[i - 1] ^ magicEnd[i - 1]);
				for (int k = magicEnd[i - 1]; k; k = (k - 1) & magicEnd[i - 1])
					dp[s] = max(dp[s], maxValue[basic | k] + f[s] * numberSize[i]);

				dp[s] = max(dp[s], maxValue[basic] + f[s] * numberSize[i]);
//				cout << dp[s] << " " << numberSize[i] << '\n';
			}

			for (int s = 0;s < allBitMakes; ++s)
				maxValue[s] = dp[s],
				dp[s] = 0;
		}

//		cout << number.size() << '\n';

		cout << *max_element(maxValue.begin(), maxValue.end()) << '\n';
	};

	init();
	solve();

	return 0;
}


#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
const int N = 1e5 + 5, M = 1e9 + 5, K = 8, INF = 0x3f3f3f3f;
int n, m, k, dp[1 << K], nowEvent[K];
struct EVENT {
	int pos, id;
	EVENT() : pos(0), id(0) {}
	EVENT(int _p, int _i) : pos(_p), id(_i) {}
	bool operator < (const EVENT &d) const { return pos < d.pos; }
};
vector<EVENT> event;
int Count(int num) {
	int ret = 0;
	for (int i = 0; i < 8; ++i) ret += (num >> i) & 1;
	return ret;
}
int main() {
	scanf("%d%d%d", &n, &m, &k);
	for (int i = 1; i <= n; ++i) {
		int L, R;
		scanf("%d%d", &L, &R);
		event.push_back(EVENT(L, i));
		event.push_back(EVENT(R + 1, -i));
		//这里应该写成 -i...过脑子！！！
	}
	sort(event.begin(), event.end());
	for (int i = 1; i < 256; ++i) dp[i] = -INF;
	for (int i = 0; i < event.size(); ++i) {
		int id = event[i].id, len = (i == event.size() - 1) ? 0 : (event[i + 1].pos - event[i].pos);
//		printf("id : %d\n", id);
		if (id > 0) {
			int pos = 0;
			for (int j = 0; j < 8; ++j) {
				if (nowEvent[j] == 0) {
					nowEvent[j] = id;
					pos = j;
					break ;
				}
			}
			for (int st = 255; st >= 0; --st) {
				if (st & (1 << pos)) dp[st] = dp[st ^ (1 << pos)] + len * (Count(st) & 1);
				else dp[st] = dp[st] + len * (Count(st) & 1);
			}
		} else {
			int pos = 0;
			for (int j = 0; j < 8; ++j) {
				if (nowEvent[j] == -id) {
					nowEvent[j] = 0;
					pos = j;
					break ;
				}
			}
//			printf("pos : %d\n", pos);
			for (int st = 0; st < 256; ++st) { //这里应该是从0到 (1<<k)-1
				if (st & (1 << pos)) dp[st] = -INF;
				else dp[st] = max(dp[st], dp[st ^ (1 << pos)]) + len * (Count(st) & 1);
			}
		}
//		printf("i : %d len : %d\n", i, len);
	//	for (int j = 0; j < k; ++j) printf("j : %d nowEvent : %d\n", j, nowEvent[j]);
//		for (int st = 0; st < (1 << k); ++st) printf("st : %d dp : %d\n", st, dp[st]);
	//	printf("\n");
	}
	printf("%d\n", dp[0]);
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#include<vector>
#include<set>
#include<bitset>
#include<cassert>
#define next MabLcdG
#define R register
#define debug puts("wn")
#define chkmax(x, y) (x=max(x, y))
#define chkmin(x, y) (x=min(x, y))
#define pos(x, y) ((x-1)*9+y)
#define mod 10000000071
using namespace std;
typedef int ll;
typedef long double ld;
typedef unsigned long long ull;
typedef double dl;
template<typename T> void read(T &x);
template<typename T> void write(T x);
template<typename T> void writesp(T x);
template<typename T> void writeln(T x);

const ll N=2e5+5, M=1<<9, inf=1e9;

ll n, m, k;

struct node{
	ll pos, id;
	inline bool operator <(const node &X)const{
		return pos<X.pos;
	}
}q[N<<1];
ll f[N], s;
ll cnt;
ll vis[9];

inline ll popcount(ll x){
	ll res=0;
	for (; x; x-=x&-x) res^=1;
	return res;
}

int main(){
	read(n); read(m); read(k); s=255;
	for (R ll i=1, x, y; i<=n; i++){
		read(x); read(y);
		q[++cnt]=(node){x, i};
		q[++cnt]=(node){y+1, -i};
	}
	for (R ll i=1; i<=s; i++) f[i]=-inf;
	sort(q+1, q+cnt+1);
	for (R ll i=1, len, pos; i<=cnt; i++){
		len=(i==cnt)?0:q[i+1].pos-q[i].pos;
		if (q[i].id>0){
			for (R ll j=0; j<8; j++){
				if (!vis[j]){
					pos=j;
					vis[j]=q[i].id;
					break;
				}
			}
			for (R ll j=s; ~j; j--){
				if (j>>pos&1){
					f[j]=f[j^(1<<pos)]+len*popcount(j);
				}else f[j]+=len*popcount(j);
			}
		}else {
			for (R ll j=0; j<8; j++){
				if (vis[j]==-q[i].id){
					pos=j;
					vis[j]=0;
					break;
				}
			}
			for (R ll j=0; j<=s; j++){
				if (j>>pos&1) f[j]=-inf;
				else chkmax(f[j], f[j^(1<<pos)])+=len*popcount(j);
			}

		}
	}
	writeln(f[0]);
}
template<typename T> void read(T &x){
	x=0; int t=1;
	char wn=getchar();
	while (wn<'0' || wn>'9'){
		if (wn=='-') t=-1;
		wn=getchar();
	}
	while (wn>='0' && wn<='9'){
		x=x*10+wn-'0'; wn=getchar();
	}
	x*=t;
}
template<typename T> void write(T x){
	if (x<0){putchar('-'); x=-x;}
	if (x<=9){putchar(x+'0'); return;}
	write(x/10); putchar(x%10+'0');
}
template<typename T> void writesp(T x){
	write(x); putchar(' ');
}

template<typename T> void writeln(T x){
	write(x); putchar('\n');
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>

using namespace std;

struct node {
    int x, y, z;
    bool operator < (const node &A) const {
        return x < A.x;
    }
} c[200001];

vector<int> a[200001];
map<int, int> e[200001];
int n, m, k, l[100001][2], cnt, f[256], g[256], r[200001];

int main() {
    scanf("%d%d%d", &n, &m, &k);
    cnt = 0;
    for (int i = 1; i <= n; i++) {
        int x, y;
        scanf("%d%d", &x, &y); l[i][0] = x; l[i][1] = y;
        c[++cnt].x = x; c[cnt].y = i; c[cnt].z = 0;
        c[++cnt].x = y; c[cnt].y = i; c[cnt].z = 1;
    }
    sort(c + 1, c + cnt + 1);
    int tot = 0;
    for (int i = 1; i <= cnt; i++) {
        if (i == 1 || c[i].x != c[i - 1].x)
            r[++tot] = c[i].x - c[i - 1].x;
        l[c[i].y][c[i].z] = tot;
    }

    for (int i = 1; i <= tot; i++)
        a[i].clear(), e[i].clear();
    for (int i = 1; i <= n; i++)
        for (int j = l[i][0]; j <= l[i][1]; j++)
            a[j].push_back(i),
            e[j][i] = a[j].size() - 1;

    memset(f, 128, sizeof(f));
    f[0] = 0;
    for (int i = 1; i <= tot; i++) {
        //printf("%d %d\n", i, a[i].size());
        //for (int j = 0; j < a[i].size(); j++)
        //    printf("%d ", a[i][j]);
        //printf("\n");
        memset(g, 128, sizeof(g));
        for (int j = 0; j < 1 << k; j++)
            if (f[j] >= 0) {
                int status = 0;
                for (int x = 0; x < k; x++)
                    if (j && (1 << x))
                        if (e[i].find(a[i - 1][x]) != e[i].end())
                            status |= 1 << e[i][a[i - 1][x]];
                g[status] = max(g[status], f[j]);
            }
        for (int x = 1; x < 1 << a[i].size(); x++) {
            for (int y = x; y; y = (y - 1) & x)
                g[x] = max(g[x], g[y]);
            g[x] = max(g[x], g[0]);
        }

        for (int j = 0; j < 1 << a[i].size(); j++)
            if (g[j] >= 0) {
                int t = 0;
                for (int x = 0; x < a[i].size(); x++)
                    if (j & (1 << x))
                        ++t;
                //printf("! %d %d\n", j, t);
                if (t & 1)
                    g[j] += r[i];
            }
        memcpy(f, g, sizeof(f));
        //printf("%d\n", r[i]);
        //for (int j = 0; j < 1 << a[i].size(); j++)
        //    printf("%d ", f[j]);
        //printf("\n");
    }
    int ans = 0;
    for (int i = 0; i < 1 << k; i++)
        ans = max(ans, f[i]);
    printf("%d\n", ans);
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>

using namespace std;

struct node {
    int x, y, z;
    bool operator < (const node &A) const {
        return x < A.x;
    }
} c[200001];

vector<int> a[200001];
map<int, int> e[200001];
int n, m, k, l[100001][2], cnt, f[256], g[256][2], r[200001];

int main() {
    scanf("%d%d%d", &n, &m, &k);
    cnt = 0;
    for (int i = 1; i <= n; i++) {
        int x, y;
        scanf("%d%d", &x, &y); --x; l[i][0] = x; l[i][1] = y;
        c[++cnt].x = x; c[cnt].y = i; c[cnt].z = 0;
        c[++cnt].x = y; c[cnt].y = i; c[cnt].z = 1;
    }
    sort(c + 1, c + cnt + 1);
    int tot = 0;
    for (int i = 1; i <= cnt; i++) {
        if (i == 1 || c[i].x != c[i - 1].x)
            r[++tot] = c[i].x - c[i - 1].x;
        l[c[i].y][c[i].z] = tot;
    }

    r[1] = 0;

    for (int i = 1; i <= tot; i++)
        a[i].clear(), e[i].clear();
    for (int i = 1; i <= n; i++)
        for (int j = l[i][0] + 1; j <= l[i][1]; j++)
            a[j].push_back(i),
            e[j][i] = a[j].size() - 1;

    memset(f, 128, sizeof(f));
    f[0] = 0;
    for (int i = 1; i <= tot; i++) {
        //printf("%d %d\n", i, a[i].size());
        //printf("XXX\n");
        //for (int j = 0; j < a[i].size(); j++)
        //    printf("%d ", a[i][j]);
        //printf("\n");
        memset(g, 128, sizeof(g));
        for (int j = 0; j < 1 << k; j++)
            if (f[j] >= 0) {
                int status = 0, t = 0;
                for (int x = 0; x < k; x++)
                    if (j & (1 << x)) {
                        //printf("x %d %d %d\n", j, x, a[i - 1][x]);
                        if (e[i].find(a[i - 1][x]) != e[i].end())
                            status |= 1 << e[i][a[i - 1][x]];//, t ^= 1;
                    }
                t = 0;
                //printf("%d -> %d %d\n", j, status, t);
                g[status][t] = max(g[status][t], f[j]);
            }

        int ban = 0;
        for (int x = 0; x < a[i - 1].size(); x++)
            if (e[i].find(a[i - 1][x]) != e[i].end())
               ban |= 1 << e[i][a[i - 1][x]];

         /*for (int j = 0; j < 1 << a[i].size(); j++)
             printf("%d ", g[j][0]);
         printf("\n");*/

        for (int u = 0; u < 1; u++)
            for (int x = 1; x < 1 << a[i].size(); x++) {
                for (int y = x; y; y = (y - 1) & x)
                    if ((ban & x) == (ban & y))
                        g[x][u] = max(g[x][u], g[y][u]);
                if (!(ban & x))
                    g[x][u] = max(g[x][u], g[0][u]);
            }

         /*for (int j = 0; j < 1 << a[i].size(); j++)
             printf("%d ", g[j][1]);
         printf("\n");*/
        memset(f, 128, sizeof(f));
        for (int j = 0; j < 1 << a[i].size(); j++) {
                int t = 0;
                for (int x = 0; x < a[i].size(); x++)
                    if (j & (1 << x))
                        t ^= 1;
                if (t == 1) {
                    f[j] = max(f[j], g[j][1] + r[i]);
                    f[j] = max(f[j], g[j][0] + r[i]);
                }
                    else
                        f[j] = max(f[j], g[j][0]),
                        f[j] = max(f[j], g[j][1]);

            }
         //printf("N\n");
         //for (int j = 0; j < 1 << a[i].size(); j++)
         //    printf("%d ", f[j]);
         //printf("\n");
    }
    int ans = 0;
    for (int i = 0; i < 1 << k; i++)
        ans = max(ans, f[i]);
    printf("%d\n", ans);
}


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>

using namespace std;

struct node {
    int x, y, z;
    bool operator < (const node &A) const {
        return x < A.x;
    }
} c[200001];

vector<int> a[200001];
map<int, int> e[200001];
int n, m, k, l[100001][2], cnt, f[256], g[256], r[200001];

int main() {
    scanf("%d%d%d", &n, &m, &k);
    cnt = 0;
    for (int i = 1; i <= n; i++) {
        int x, y;
        scanf("%d%d", &x, &y); --x; l[i][0] = x; l[i][1] = y;
        c[++cnt].x = x; c[cnt].y = i; c[cnt].z = 0;
        c[++cnt].x = y; c[cnt].y = i; c[cnt].z = 1;
    }
    sort(c + 1, c + cnt + 1);
    int tot = 0;
    for (int i = 1; i <= cnt; i++) {
        if (i == 1 || c[i].x != c[i - 1].x)
            r[++tot] = c[i].x - c[i - 1].x;
        l[c[i].y][c[i].z] = tot;
    }

    r[1] = 0;

    for (int i = 1; i <= tot; i++)
        a[i].clear(), e[i].clear();
    for (int i = 1; i <= n; i++)
        for (int j = l[i][0] + 1; j <= l[i][1]; j++)
            a[j].push_back(i),
            e[j][i] = a[j].size() - 1;

    memset(f, 128, sizeof(f));
    f[0] = 0;
    for (int i = 1; i <= tot; i++) {
        //printf("%d %d\n", i, a[i].size());
        //for (int j = 0; j < a[i].size(); j++)
        //    printf("%d ", a[i][j]);
        //printf("\n");
        memset(g, 128, sizeof(g));
        for (int j = 0; j < 1 << k; j++)
            if (f[j] >= 0) {
                int status = 0;
                for (int x = 0; x < k; x++)
                    if (j && (1 << x))
                        if (e[i].find(a[i - 1][x]) != e[i].end())
                            status |= 1 << e[i][a[i - 1][x]];
                g[status] = max(g[status], f[j]);
            }
        for (int x = 1; x < 1 << a[i].size(); x++) {
            for (int y = x; y; y = (y - 1) & x)
                g[x] = max(g[x], g[y]);
            g[x] = max(g[x], g[0]);
        }

        for (int j = 0; j < 1 << a[i].size(); j++)
            if (g[j] >= 0) {
                int t = 0;
                for (int x = 0; x < a[i].size(); x++)
                    if (j & (1 << x))
                        ++t;
                //printf("! %d %d\n", j, t);
                if (t & 1)
                    g[j] += r[i];
            }
        memcpy(f, g, sizeof(f));
        //printf("%d\n", r[i]);
        //for (int j = 0; j < 1 << a[i].size(); j++)
        //    printf("%d ", f[j]);
        //printf("\n");
    }
    int ans = 0;
    for (int i = 0; i < 1 << k; i++)
        ans = max(ans, f[i]);
    printf("%d\n", ans);
}


#include <bits/stdc++.h>

#define ln                '\n'
#define all(dat)           dat.begin(), dat.end()
#define loop(i, to)        for (int i = 0; i < to; ++i)
#define cont(i, to)        for (int i = 1; i <= to; ++i)
#define circ(i, fr, to)    for (int i = fr; i <= to; ++i)
#define foreach(i, dat)    for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)

typedef long long          num;

using namespace std;

const int nsz = 1e5, ksz = 8, msksz = (1 << ksz) - 1, inf = 0x3f3f3f3f;
bool vis[nsz + 5];
int n, m, k, full, p[nsz + 5], dp[2][msksz + 5], ans;

struct event {
	int pos, id, st;

	event(int pos = 0, int id = 0, int st = 0) {
		this->pos = pos, this->id = id, this->st = st;
	}
};
vector<event> dat;

bool inline operator < (event a, event b) {
	return a.pos != b.pos ? a.pos < b.pos : a.st > b.st;
}

void inline upd(int &a, int b) {
	a < b && (a = b);
}

int main() {
	scanf("%d%d%d", &n, &m, &k);
	cont (i, n) {
		int l, r;
		scanf("%d%d", &l, &r);
		dat.push_back(event(l, i, +1));
		dat.push_back(event(r, i, -1));
	}
	sort(all(dat));
	memset(dp, -inf, sizeof(dp));
	int o = 0, x = 1, l = dat[0].pos, i = 0, k = 0;
	for (; i < dat.size() && dat[i].pos == l; ++i) {
		k += dat[i].st;
	}
	full = (1 << k) - 1;
	circ (S, 0, full) {
		dp[o][S] = 1;
	}
	for (; i < dat.size(); ++i) {
		l = dat[i].pos;
		int len = dat[i].pos - dat[i - 1].pos + 1, pk = k, dk, pfull = full, dfull;
		memset(vis, 0, sizeof(vis));
		for (; i < dat.size() && dat[i].pos == l; ++i) {
			k += dat[i].st;
			if (dat[i].st == -1) {
				vis[p[dat[i].id]] = 1;
			} else if (dat[i].st == +1) {
				p[dat[i].id] = k - 1;
			}
		}
		dk = k - pk;
		full = (1 << k) - 1;
		dfull = (1 << max(0, dk)) - 1;
		circ (S, 0, pfull) {
			int val = dp[o][S], nS = 0, j = 0;
			if (val < 0)  continue;
			loop (i, pk) {
				if (vis[i])  continue;
				nS |= (S >> i & 1) << j;
				++j;
			}
			if (dk <= 0) {
				upd(dp[x][nS], val + (__builtin_popcount(nS) & 1) * len);
			} else {
				circ (dS, 0, dfull) {
					int nnS = nS << dk | dS;
					upd(dp[x][nnS], val + (__builtin_popcount(nS) & 1) * len);
				}
			}
		}
		swap(o, x);
		memset(dp[x], -inf, sizeof(dp[x]));
	}
	circ (S, 0, full) {
		upd(ans, dp[o][S]);
	}
	printf("%d\n", ans);
}


#include <bits/stdc++.h>

#define ln                '\n'
#define all(dat)           dat.begin(), dat.end()
#define loop(i, to)        for (int i = 0; i < to; ++i)
#define cont(i, to)        for (int i = 1; i <= to; ++i)
#define circ(i, fr, to)    for (int i = fr; i <= to; ++i)
#define foreach(i, dat)    for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)

typedef long long          num;

using namespace std;

const int nsz = 1e5, ksz = 8, msksz = (1 << ksz) - 1, inf = 0x3f3f3f3f;
bool vis[nsz + 5];
int n, m, k, full, p[nsz + 5], q[ksz + 5], dp[2][msksz + 5], ans;

struct event {
	int pos, id, st;

	event(int pos = 0, int id = 0, int st = 0) {
		this->pos = pos, this->id = id, this->st = st;
	}
};
vector<event> dat;

bool inline operator < (event a, event b) {
	return a.pos != b.pos ? a.pos < b.pos : a.st < b.st;
}

void inline upd(int &a, int b) {
	a < b && (a = b);
}

string inline bin(int S, int len) {
	string s;
	loop (i, len) {
		s += (S >> i & 1) ^ 48;
	}
	return s;
}

int main() {
	scanf("%d%d%d", &n, &m, &k);
	cont (i, n) {
		int l, r;
		scanf("%d%d", &l, &r);
		dat.push_back(event(l, i, +1));
		dat.push_back(event(r + 1, i, -1));
	}
	sort(all(dat));
	memset(dp, -inf, sizeof(dp));
	int o = 0, x = 1, l = dat[0].pos, i = 0, k = 0;
	for (; i < dat.size() && dat[i].pos == l; ++i) {
		p[dat[i].id] = k;
		q[k] = dat[i].id;
		++k;
	}
	full = (1 << k) - 1;
	circ (S, 0, full) {
		dp[o][S] = 0;
	}
	for (; i < dat.size();) {
		l = dat[i].pos;
		int il = i, ir = i, len = dat[i].pos - dat[i - 1].pos, pk = k, dk = 0, pfull = full, dfull;
		memset(vis, 0, sizeof(vis));
		for (; i < dat.size() && dat[i].pos == l; ++i, ++ir) {
			if (dat[i].st == -1) {
				--k;
				vis[p[dat[i].id]] = 1;
			}
		}
		for (int i = 0, j = 0; i < pk; ++i) {
			if (vis[i])  continue;
			p[q[i]] = j;
			q[j] = q[i];
			++j;
		}
		circ (i, il, ir - 1) {
			if (dat[i].st == +1) {
				p[dat[i].id] = k;
				q[k] = dat[i].id;
				++k;
				++dk;
			}
		}
		full = (1 << k) - 1;
		dfull = (1 << dk) - 1;
		circ (S, 0, pfull) {
			int val = dp[o][S] + (__builtin_popcount(S) & 1) * len, nS = 0, j = 0;
			if (val < 0)  continue;
			loop (i, pk) {
				if (vis[i])  continue;
				nS |= (S >> i & 1) << j;
				++j;
			}
			if (dk <= 0) {
				upd(dp[x][nS], val);
			} else {
				circ (dS, 0, dfull) {
					int nnS = nS | (dS << j);
					upd(dp[x][nnS], val);
				}
			}
		}
		swap(o, x);
		memset(dp[x], -inf, sizeof(dp[x]));
	}
	circ (S, 0, full) {
		upd(ans, dp[o][S]);
	}
	printf("%d\n", ans);
}


#include <bits/stdc++.h>

#define ln                '\n'
#define all(dat)           dat.begin(), dat.end()
#define loop(i, to)        for (int i = 0; i < to; ++i)
#define cont(i, to)        for (int i = 1; i <= to; ++i)
#define circ(i, fr, to)    for (int i = fr; i <= to; ++i)
#define foreach(i, dat)    for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)

typedef long long          num;

using namespace std;

const int nsz = 1e5, ksz = 8, msksz = (1 << ksz) - 1, inf = 0x3f3f3f3f;
bool vis[nsz + 5];
int n, m, k, full, p[nsz + 5], q[ksz + 5], dp[2][msksz + 5], ans;
vector< pair<int, int> > s;

struct event {
	int pos, id, st;

	event(int pos = 0, int id = 0, int st = 0) {
		this->pos = pos, this->id = id, this->st = st;
	}
};
vector<event> dat;

bool inline operator < (event a, event b) {
	return a.pos != b.pos ? a.pos < b.pos : a.st < b.st;
}

void inline upd(int &a, int b) {
	a < b && (a = b);
}

int main() {
	scanf("%d%d%d", &n, &m, &k);
	cont (i, n) {
		int l, r;
		scanf("%d%d", &l, &r);
		s.push_back(make_pair(l, r));
	}
	sort(all(s));
	s.erase(unique(all(s)), s.end());
	loop (i, s.size()) {
		int l = s[i].first, r = s[i].second;
		dat.push_back(event(l, i, +1));
		dat.push_back(event(r + 1, i, -1));
	}
	sort(all(dat));
	memset(dp, -inf, sizeof(dp));
	int o = 0, x = 1, l = dat[0].pos, i = 0, k = 0;
	for (; i < dat.size() && dat[i].pos == l; ++i) {
		p[dat[i].id] = k;
		q[k] = dat[i].id;
		++k;
	}
	full = (1 << k) - 1;
	circ (S, 0, full) {
		dp[o][S] = 0;
	}
	for (; i < dat.size();) {
		l = dat[i].pos;
		int il = i, ir = i, len = dat[i].pos - dat[i - 1].pos, pk = k, dk = 0, pfull = full, dfull;
		memset(vis, 0, sizeof(vis));
		for (; i < dat.size() && dat[i].pos == l; ++i, ++ir) {
			if (dat[i].st == -1) {
				vis[p[dat[i].id]] = 1;
				--k;
			}
		}
		for (int i = 0, j = 0; i < pk; ++i) {
			if (vis[i])  continue;
			p[q[i]] = j, q[j] = q[i];
			++j;
		}
		circ (i, il, ir - 1) {
			if (dat[i].st == +1) {
				p[dat[i].id] = k, q[k] = dat[i].id;
				++k;
				++dk;
			}
		}
		full = (1 << k) - 1;
		dfull = (1 << dk) - 1;
		circ (S, 0, pfull) {
			int val = dp[o][S] + (__builtin_popcount(S) & 1) * len, nS = 0, j = 0;
			if (val < 0)  continue;
			loop (i, pk) {
				if (vis[i])  continue;
				nS |= (S >> i & 1) << j;
				++j;
			}
			if (dk <= 0) {
				upd(dp[x][nS], val);
			} else {
				circ (dS, 0, dfull) {
					int nnS = nS | (dS << (k - dk));
					upd(dp[x][nnS], val);
				}
			}
		}
		swap(o, x);
		memset(dp[x], -inf, sizeof(dp[x]));
	}
	circ (S, 0, full) {
		upd(ans, dp[o][S]);
	}
	printf("%d\n", ans);
}


#include <bits/stdc++.h>

#define ln                '\n'
#define all(dat)           dat.begin(), dat.end()
#define loop(i, to)        for (int i = 0; i < to; ++i)
#define cont(i, to)        for (int i = 1; i <= to; ++i)
#define circ(i, fr, to)    for (int i = fr; i <= to; ++i)
#define foreach(i, dat)    for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)

typedef long long          num;

using namespace std;

const int nsz = 1e5, ksz = 8, msksz = (1 << ksz) - 1, inf = 0x3f3f3f3f;
bool vis[nsz + 5];
int n, m, k, full, p[nsz + 5], dp[2][msksz + 5], ans;

struct event {
	int pos, id, st;

	event(int pos = 0, int id = 0, int st = 0) {
		this->pos = pos, this->id = id, this->st = st;
	}
};
vector<event> dat;

bool inline operator < (event a, event b) {
	return a.pos != b.pos ? a.pos < b.pos : a.st > b.st;
}

void inline upd(int &a, int b) {
	a < b && (a = b);
}

string inline bin(int S, int len) {
	string s;
	loop (i, len) {
		s += (S >> i & 1) ^ 48;
	}
	return s;
}

int main() {
	scanf("%d%d%d", &n, &m, &k);
	cont (i, n) {
		int l, r;
		scanf("%d%d", &l, &r);
		dat.push_back(event(l, i, +1));
		dat.push_back(event(r + 1, i, -1));
	}
	sort(all(dat));
	memset(dp, -inf, sizeof(dp));
	int o = 0, x = 1, l = dat[0].pos, i = 0, k = 0;
	for (; i < dat.size() && dat[i].pos == l; ++i) {
		k += dat[i].st;
	}
	full = (1 << k) - 1;
	circ (S, 0, full) {
		dp[o][S] = 0;
	}
	for (; i < dat.size();) {
		l = dat[i].pos;
		int len = dat[i].pos - dat[i - 1].pos, pk = k, dk, pfull = full, dfull;
		memset(vis, 0, sizeof(vis));
		for (; i < dat.size() && dat[i].pos == l; ++i) {
			k += dat[i].st;
			if (dat[i].st == -1) {
				vis[p[dat[i].id]] = 1;
			} else if (dat[i].st == +1) {
				p[dat[i].id] = k - 1;
			}
		}
		dk = k - pk;
		full = (1 << k) - 1;
		dfull = (1 << max(0, dk)) - 1;
		circ (S, 0, pfull) {
			int val = dp[o][S], nS = 0, j = 0;
			if (val < 0)  continue;
			loop (i, pk) {
				if (vis[i])  continue;
				nS |= (S >> i & 1) << j;
				++j;
			}
			if (dk <= 0) {
				upd(dp[x][nS], val + (__builtin_popcount(S) & 1) * len);
			} else {
				circ (dS, 0, dfull) {
					int nnS = nS << dk | dS;
					upd(dp[x][nnS], val + (__builtin_popcount(S) & 1) * len);
				}
			}
		}
		swap(o, x);
		memset(dp[x], -inf, sizeof(dp[x]));
	}
	circ (S, 0, full) {
		upd(ans, dp[o][S]);
	}
	printf("%d\n", ans);
}


#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
void read(int &a){
	a=0;
	char c=getchar();
	while(c<'0'||c>'9'){
		c=getchar();
	}
	while(c>='0'&&c<='9'){
		a=(a<<1)+(a<<3)+(c^48);
		c=getchar();
	}
}
int count_bit(int x){
	int ans=0;
	while(x){
		x-=(x&(-x));
		ans++;
	}
	return ans;
}
const int Maxn=100000;
const int Maxk=8;
int n,m,k;
struct Segment{
	int l,r;
}seg[Maxn+5];
struct Node{
	int pos,val,id;
	friend bool operator <(Node p,Node q){
		if(p.pos==q.pos){
			return p.val<q.val;
		}
		return p.pos<q.pos;
	}
}a[Maxn<<1|5];
int len;
int id[Maxk+5];
int f[2][1<<Maxk|5];
bool check(int x){
	for(int i=0;i<k;i++){
		if(((x>>i)&1)&&id[i]==0){
			return 0;
		}
	}
	return 1;
}
int main(){
	read(n),read(m),read(k);
	for(int i=1;i<=n;i++){
		read(seg[i].l),read(seg[i].r);
		a[++len].pos=seg[i].l;
		a[len].val=1;
		a[len].id=i;
		a[++len].pos=seg[i].r+1;
		a[len].val=-1;
		a[len].id=i;
	}
	sort(a+1,a+1+len);
	int last_pos=a[1].pos;
	int pos_id;
	for(int i=1;i<=len;i++){
		memset(f[1],0,sizeof f[1]);
		if(a[i].val==-1){
			for(pos_id=0;id[pos_id]!=a[i].id;pos_id++);
			id[pos_id]=0;
			for(int j=0;j<(1<<k);j++){
				if(!check(j)){
					continue;
				}
				f[1][j]=max(f[0][j]+(count_bit(j)&1)*(a[i].pos-last_pos),f[0][j|(1<<pos_id)]+(count_bit(j|(1<<pos_id))&1*(a[i].pos-last_pos)));
			}
		}
		else{
			for(pos_id=0;id[pos_id]>0;pos_id++);
			for(int j=0;j<(1<<k);j++){
				if(!check(j)){
					continue;
				}
				f[1][j]=f[0][j]+(count_bit(j)&1)*(a[i].pos-last_pos);
				f[1][j|(1<<pos_id)]=f[0][j]+(count_bit(j)&1)*(a[i].pos-last_pos);
			}
			id[pos_id]=a[i].id;
		}
		last_pos=a[i].pos;
		swap(f[0],f[1]);
	}
	printf("%d\n",f[0][0]);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
void read(int &a){
	a=0;
	char c=getchar();
	while(c<'0'||c>'9'){
		c=getchar();
	}
	while(c>='0'&&c<='9'){
		a=(a<<1)+(a<<3)+(c^48);
		c=getchar();
	}
}
int count_bit(int x){
	int ans=0;
	while(x){
		x-=(x&(-x));
		ans++;
	}
	return ans;
}
const int Maxn=100000;
const int Maxk=8;
int n,m,k;
struct Segment{
	int l,r;
}seg[Maxn+5];
struct Node{
	int pos,val,id;
	friend bool operator <(Node p,Node q){
		if(p.pos==q.pos){
			return p.val<q.val;
		}
		return p.pos<q.pos;
	}
}a[Maxn<<1|5];
int len;
int id[Maxk+5];
int f[2][1<<Maxk|5];
bool check(int x){
	for(int i=0;i<k;i++){
		if(((x>>i)&1)&&id[i]==0){
			return 0;
		}
	}
	return 1;
}
int main(){
	read(n),read(m),read(k);
	for(int i=1;i<=n;i++){
		read(seg[i].l),read(seg[i].r);
		a[++len].pos=seg[i].l;
		a[len].val=1;
		a[len].id=i;
		a[++len].pos=seg[i].r+1;
		a[len].val=-1;
		a[len].id=i;
	}
	sort(a+1,a+1+len);
	int last_pos=a[1].pos;
	int pos_id;
	for(int i=1;i<=len;i++){
		memset(f[1],0,sizeof f[1]);
		if(a[i].val==-1){
			for(pos_id=0;id[pos_id]!=a[i].id;pos_id++);
			id[pos_id]=0;
			for(int j=0;j<(1<<k);j++){
				if(!check(j)){
					continue;
				}
				f[1][j]=max(f[0][j]+(count_bit(j)&1)*(a[i].pos-last_pos),f[0][j|(1<<pos_id)]+((count_bit(j|(1<<pos_id))&1)*(a[i].pos-last_pos)));
			}
		}
		else{
			for(pos_id=0;id[pos_id]>0;pos_id++);
			for(int j=0;j<(1<<k);j++){
				if(!check(j)){
					continue;
				}
				f[1][j]=f[0][j]+(count_bit(j)&1)*(a[i].pos-last_pos);
				f[1][j|(1<<pos_id)]=f[0][j]+(count_bit(j)&1)*(a[i].pos-last_pos);
			}
			id[pos_id]=a[i].id;
		}
		last_pos=a[i].pos;
		swap(f[0],f[1]);
	}
	printf("%d\n",f[0][0]);
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <climits>
#include <cstdlib>
#include <cstdio>
#include <bitset>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define fi first
#define se second
#define U unsigned
#define P std::pair<int,int>
#define LL long long
#define pb push_back
#define MP std::make_pair
#define all(x) x.begin(),x.end()
#define CLR(i,a) memset(i,a,sizeof(i))
#define FOR(i,a,b) for(int i = a;i <= b;++i)
#define ROF(i,a,b) for(int i = a;i >= b;--i)
#define DEBUG(x) std::cerr << #x << '=' << x << std::endl

const int MAXN = 5e5 + 5;

struct Node{
	int x,d,id;
	Node(int x=0,int d=0,int id=0) : x(x),d(d),id(id) {}

	bool operator < (const Node &t) const {
		return x == t.x ? d < t.d : x < t.x;
	}
}a[MAXN];

int n,m,k,N;
int pc[(1<<15)+3];
// 设 f[i][S] 表示 i 点上选了线段的集合为 S 的最优值
// 枚举当前位置的线段选或不选 如果状态 1 的个数为奇数就答案加上距离
int pos[MAXN];// 在二进制第几位
int g[MAXN];// 这一位哪些二进制位被使用了
int f[2][(1<<15)+3];
int now = 0;

inline int find0(int x){
	FOR(i,0,9) if(!((x>>i)&1)) return i;
}

int main(){
	scanf("%d%d%d",&n,&m,&k);
	FOR(i,1,(1<<15)) pc[i] = pc[i>>1]+(i&1);
	FOR(i,1,n){
		int l,r;scanf("%d%d",&l,&r);
		a[++N] = Node(l,1,i);a[++N] = Node(r+1,-1,i);
	}
	std::sort(a+1,a+N+1);
	FOR(i,0,N-1){
		int dis = a[i+1].x-a[i].x;
		if(i == 0) dis = 0;
		// DEBUG(dis);
		if(a[i+1].d == 1){
			int t = find0(g[i]);
			pos[a[i+1].id] = t;
			g[i+1] = g[i]|(1<<t);
			FOR(S,0,(1<<k)-1){
				if((S|g[i]) != g[i]) continue;
				f[now^1][S] = std::max(f[now^1][S],f[now][S]+(pc[S]&1 ? dis : 0));
				f[now^1][S|(1<<t)] = std::max(f[now^1][S|(1<<t)],f[now][S]+(pc[S]&1 ? dis : 0));
			}
		}
		else{
			int t = pos[a[i+1].id];
			g[i+1] = g[i]^(1<<t);
			FOR(S,0,(1<<k)-1){
				if((S|g[i]) != g[i]) continue;
				// f[i+1][S] = std::max(f[i+1][S],f[i][S]+(pc[S]&1?dis:0));
				// if(i == 4 && S == 2)
				if(!((S>>t)&1)) f[now^1][S] = std::max(f[now^1][S],f[now][S]+(pc[S]&1?dis:0));
				else f[now^1][S^(1<<t)] = std::max(f[now^1][S^(1<<t)],f[now][S]+(pc[S]&1?dis:0));
			}
		}
		now ^= 1;
	}
	// DEBUG(f[4][0]);
	int ans = 0;
	FOR(S,0,(1<<k)-1){
		if((S|g[N]) != g[N]) continue;
		ans = std::max(ans,f[now][S]);
	}
	printf("%d\n",ans);
	return 0;
}


#include <algorithm>
#include <iostream>
#include <cstring>
#include <climits>
#include <cstdlib>
#include <cstdio>
#include <bitset>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <map>
#include <set>

#define fi first
#define se second
#define U unsigned
#define P std::pair<int,int>
#define LL long long
#define pb push_back
#define MP std::make_pair
#define all(x) x.begin(),x.end()
#define CLR(i,a) memset(i,a,sizeof(i))
#define FOR(i,a,b) for(int i = a;i <= b;++i)
#define ROF(i,a,b) for(int i = a;i >= b;--i)
#define DEBUG(x) std::cerr << #x << '=' << x << std::endl

const int MAXN = 5e5 + 5;

struct Node{
	int x,d,id;
	Node(int x=0,int d=0,int id=0) : x(x),d(d),id(id) {}

	bool operator < (const Node &t) const {
		return x == t.x ? d > t.d : x < t.x;
	}
}a[MAXN];

int n,m,k,N;
int pc[(1<<15)+3];
// 设 f[i][S] 表示 i 点上选了线段的集合为 S 的最优值
// 枚举当前位置的线段选或不选 如果状态 1 的个数为奇数就答案加上距离
int pos[MAXN];// 在二进制第几位
int g[MAXN];// 这一位哪些二进制位被使用了
int f[2][(1<<15)+3];
int now = 0;

inline int find0(int x){
	FOR(i,0,9) if(!((x>>i)&1)) return i;
}

int main(){
	scanf("%d%d%d",&n,&m,&k);
	FOR(i,1,(1<<15)) pc[i] = pc[i>>1]+(i&1);
	FOR(i,1,n){
		int l,r;scanf("%d%d",&l,&r);
		a[++N] = Node(l,1,i);a[++N] = Node(r+1,-1,i);
	}
	std::sort(a+1,a+N+1);
	FOR(i,0,N-1){
		int dis = a[i+1].x-a[i].x;
		if(i == 0) dis = 0;
		// DEBUG(dis);
		if(a[i+1].d == 1){
			int t = find0(g[i]);
			pos[a[i+1].id] = t;
			g[i+1] = g[i]|(1<<t);
			FOR(S,0,(1<<k)-1){
				if((S|g[i]) != g[i]) continue;
				f[now^1][S] = std::max(f[now^1][S],f[now][S]+(pc[S]&1 ? dis : 0));
				f[now^1][S|(1<<t)] = std::max(f[now^1][S|(1<<t)],f[now][S]+(pc[S]&1 ? dis : 0));
			}
		}
		else{
			int t = pos[a[i+1].id];
			g[i+1] = g[i]^(1<<t);
			FOR(S,0,(1<<k)-1){
				if((S|g[i]) != g[i]) continue;
				// f[i+1][S] = std::max(f[i+1][S],f[i][S]+(pc[S]&1?dis:0));
				// if(i == 4 && S == 2)
				if(!((S>>t)&1)) f[now^1][S] = std::max(f[now^1][S],f[now][S]+(pc[S]&1?dis:0));
				else f[now^1][S^(1<<t)] = std::max(f[now^1][S^(1<<t)],f[now][S]+(pc[S]&1?dis:0));
			}
		}
		now ^= 1;
	}
	// DEBUG(f[4][0]);
	int ans = 0;
	FOR(S,0,(1<<k)-1){
		if((S|g[N]) != g[N]) continue;
		ans = std::max(ans,f[now][S]);
	}
	printf("%d\n",ans);
	return 0;
}


#include <iostream>
#include <cstdio>
#include <sstream>
#include <vector>
#include <algorithm>
#include <deque>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <memory.h>
#include <cmath>
#include <cassert>
using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;

#define sz size()
#define pb push_back
#define mp make_pair
#define ALL(a) (a).begin(),(a).end()
#define FOR(i,a,b) for(int i=(a),_b=(b); i<_b; ++i)
#define RFOR(i,a,b) for(int i=(a)-1,_b=(b); i>=_b; --i)
#define CLR(a,v) memset((a),(v),sizeof(a))
#define CPY(a,v) memcpy((a),(v),sizeof(a))
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)<(0)?-(a):(a))
#define HAS(a,v) ((a).find(v)!=(a).end())
#define sqr(a) ((a)*(a))

char ch[1<<20];
string gs(){ scanf("%s",ch); return string(ch); }

const double pi = 3.1415926535897932384626433832795;
const double eps=1e-8;

int main(int argn, char** argv)
{
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);

	int a,b,k;
	scanf("%d%d%d",&b,&a,&k);

	double res=1.0;
	if (b+k<a) res=1.0;
	else if (k>=a) res=0.0;
	else
	{
		FOR(i,0,k+1)
		{
			res*=1.0*(a-i);
			res/=1.0*(b+i+1);
		}
	}

	printf("%.6lf\n",1.0-res+1e-9);
	exit(0);

	return 0;
}


#pragma comment(linker, "/STACK:136777216")

#include <algorithm>
#include <iostream>
#include<stdio.h>
#include <string>
#include<sstream>
#include<string.h>
#include <vector>
#include <bitset>
#include <cmath>
#include <queue>
#include<stack>
#include <set>
#include <map>
#include<ctime>
#include<memory.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<double,double> pdd;
typedef pair<int,pii> p3i;
typedef long double ld;
typedef vector<ld> vd;

#define FOR(i,a,b) for (int i(a); i < (b); i++)
#define REP(i,n) FOR(i,0,n)
#define UN(v) sort((v).begin(),(v).end()),v.erase(unique(v.begin(),v.end()),v.end())
#define CL(a,b) memset(a,b,sizeof(a))
#define pb push_back
#define SORT(a) sort((a).begin(),(a).end())

int main(){
#ifdef LocalHost
	freopen("input.txt","r",stdin);
#endif

	int n,m,k;
	cin>>n>>m>>k;
	if(n+k<m) puts("0");
	else if(k>=m) puts("1");
	else{
		double res =1 ;
		for(int i=n+1;i<=n+k+1;i++)
			res/=i;
		for(int i=m-k-1+1;i<=m;i++)
			res*=i;
		printf("%.4lf\n",1-res);
	}
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
#include <deque>

using namespace std;
#define file "firesafe"
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef pair<int,int> pii;

const int MAXN = 500+5;
const ll INF = 10000000000000000;

int main()
{
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	int n,m,k;
	cin>>n>>m>>k;
	if(m>n+k)
	{
		printf("0.0");
	}
	else
	{
		double p = 1;
		for(int i=1;i<=k+1;i++)
		{
			p*=(m-i+1);
			p/=n+i;
		}

		p = 1-p;
		printf("%.8lf",p);
	}
	return 0;
}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string>
#include <cstring>
#include <cctype>
#include <assert.h>

using namespace std;

typedef long long llong;

int n,m,k;

int main()
{
	int i,j;

	while (scanf("%d %d %d",&n,&m,&k)!=EOF)
	{
		if (m>n+k)
		{
			printf("0.0000\n");
			continue;
		}
		if (k>=n)
		{
			printf("1.0000\n");
			continue;
		}
		double ans = 1;
		for (i=0;i<=k;i++)
		{
			ans *= m-i;
			ans /= n+i+1;
		}
		printf("%.4lf\n",1.0-ans);
	}

}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string>
#include <cstring>
#include <cctype>
#include <assert.h>

using namespace std;

typedef long long llong;

int n,m,k;

int main()
{
	int i,j;

	while (scanf("%d %d %d",&n,&m,&k)!=EOF)
	{
		double ans = 1;
		for (i=0;i<=k;i++)
		{
			ans *= m-i;
			ans /= n+i+1;
		}
		printf("%.4lf\n",1.0-ans);
	}

}


#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string>
#include <cstring>
#include <cctype>
#include <assert.h>

using namespace std;

typedef long long llong;

int n,m,k;

int main()
{
	int i,j;

	while (scanf("%d %d %d",&n,&m,&k)!=EOF)
	{
		if (m>n+k)
		{
			printf("0.0000\n");
			continue;
		}
		if (k>=n)
		{
			printf("1.0000\n");
		}
		double ans = 1;
		for (i=0;i<=k;i++)
		{
			ans *= m-i;
			ans /= n+i+1;
		}
		printf("%.4lf\n",1.0-ans);
	}

}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <sstream>
#include <stack>
#include <cassert>

#define pb push_back
#define mp make_pair
#define PI 3.1415926535897932384626433832795
#define sqr(x) (x)*(x)
#define forn(i, n) for(int i = 0; i < n; ++i)
#define ALL(x) x.begin(), x.end()
#define sz(x) int((x).size())
#define X first
#define Y second
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
typedef pair<int,int> pii;
const int INF = 2147483647;
const ll LLINF = 9223372036854775807LL;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	int n, m, k; scanf("%d%d%d", &n, &m, &k);
	double ans = 1;
	for (int i = 0; i <= k; ++i) ans *= (m-i+.0)/(n+i+1.);
	ans = 1-ans;
	ans = max(0.,ans);
	printf("%.15lf\n", ans);
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <sstream>
#include <stack>
#include <cassert>

#define pb push_back
#define mp make_pair
#define PI 3.1415926535897932384626433832795
#define sqr(x) (x)*(x)
#define forn(i, n) for(int i = 0; i < n; ++i)
#define ALL(x) x.begin(), x.end()
#define sz(x) int((x).size())
#define X first
#define Y second
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
typedef pair<int,int> pii;
const int INF = 2147483647;
const ll LLINF = 9223372036854775807LL;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	int n, m, k; scanf("%d%d%d", &n, &m, &k);
	double ans = 1;
	for (int i = 0; i <= k; ++i) ans *= (m-i+.0)/(n+i+1.);
	ans = 1-ans;
	//ans = max(0.,ans);
	if (n-m+k<0) ans = 0;
	printf("%.15lf\n", ans);
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <sstream>
#include <stack>
#include <cassert>

#define pb push_back
#define mp make_pair
#define PI 3.1415926535897932384626433832795
#define sqr(x) (x)*(x)
#define forn(i, n) for(int i = 0; i < n; ++i)
#define ALL(x) x.begin(), x.end()
#define sz(x) int((x).size())
#define X first
#define Y second
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
typedef pair<int,int> pii;
const int INF = 2147483647;
const ll LLINF = 9223372036854775807LL;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	int n, m, k; scanf("%d%d%d", &n, &m, &k);
	double ans = 1;
	for (int i = 0; i <= k; ++i) ans *= (m-i+.0)/(n+i+1.);
	ans = 1-ans;
	printf("%.15lf\n", ans);
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <set>
#include <cmath>
#include <sstream>
#include <stack>
#include <cassert>

#define pb push_back
#define mp make_pair
#define PI 3.1415926535897932384626433832795
#define sqr(x) (x)*(x)
#define forn(i, n) for(int i = 0; i < n; ++i)
#define ALL(x) x.begin(), x.end()
#define sz(x) int((x).size())
#define X first
#define Y second
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using namespace std;
typedef pair<int,int> pii;
const int INF = 2147483647;
const ll LLINF = 9223372036854775807LL;

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
#endif
	int n, m, k; scanf("%d%d%d", &n, &m, &k);
	double ans = 1;
	for (int i = 0; i <= k; ++i) ans *= (m-i+.0)/(n+i+1.);
	ans = 1-ans;
	ans = max(0,ans);
	printf("%.15lf\n", ans);
	return 0;
}


#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if (n+k<m)
    {
        printf("%.4f\n",0);
        return 0;
    }
    if (k>=m)
    {
        printf("%.4f\n",1);
        return 0;
    }
    double ans=1.0;
    for (int i=0;i<=k;i++)
    {
        ans*=(m-i);
        ans/=(n+1+i);
    }
    printf("%.4f\n",1-ans);
    return 0;
}


#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if (k>=m)
    {
        printf("%.4lf\n",1.0);//printf("%.4lf\n",1);会WA，以后要注意……
        return 0;
    }
    if (n+k<m)
    {
        printf("%.4lf\n",0.0);
        return 0;
    }
    double ans=1.0;
    for (int i=0;i<=k;i++)
    {
        ans*=(m-i);
        ans/=(n+1+i);
    }
    printf("%.4lf\n",1.0-ans);
    return 0;
}


#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if (n+k<m)
    {
        printf("%.4f\n",0);
        return 0;
    }
    if (k>=m)
    {
        printf("%.4f\n",1);
        return 0;
    }
    double ans=1.0;
    for (int i=0;i<=k;i++)
    {
        ans*=(m-i);
        ans/=(n+1+i);
    }
    printf("%.4f\n",1.0-ans);
    return 0;
}


#include <iostream>
using namespace std;
int main()
{
        int n,m,k,i,j;
        scanf("%d %d %d",&n,&m,&k);
                if(k>=m)
                {
                        printf("1\n");
                        return 0;
                }
                if(k+n<m)
                {
                       printf("0\n");
                        return 0;
                }
                double ans = 1;
                for (i=0;i<=k;i++)
                {
                        ans *= m-i;
                        ans /= n+i+1;
                }
                printf("%.4lf\n",1.0-ans);
}


#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if (n+k<m)
    {
        printf("%.4f\n",0);
        return 0;
    }
    if (k>m)
    {
        printf("%.4f\n",1);
        return 0;
    }
    double ans=1.0;
    for (int i=0;i<=k;i++)
    {
        ans*=(m-i);
        ans/=(n+1+i);
    }
    printf("%.4f\n",1-ans);
    return 0;
}


#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if (k>=m)
    {
        printf("%.4lf\n",1);
        return 0;
    }
    if (n+k<m)
    {
        printf("%.4lf\n",0);
        return 0;
    }

    double ans=1.0;
    for (int i=0;i<=k;i++)
    {
        ans*=double(m-i);
        ans/=double(n+1+i);
    }
    printf("%.4lf\n",1.0-ans);
    return 0;
}


#include <iostream>
using namespace std;
int main()
{
        int n,m,k,i,j;
        while (scanf("%d %d %d",&n,&m,&k)!=EOF)
        {
                if(k>=m)
                {
                        printf("1\n");
                        continue;
                }
                if(k+n<m)
                {
                       printf("0\n");
                        continue;
                }
                double ans = 1;
                for (i=0;i<=k;i++)
                {
                        ans *= m-i;
                        ans /= n+i+1;
                }
                printf("%.4lf\n",1.0-ans);
        }

}


#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if (k>=m)
    {
        printf("%.4lf\n",1.0);
        return 0;
    }
    if (n+k<m)
    {
        printf("%.4lf\n",0.0);
        return 0;
    }
    double ans=1.0;
    for (int i=0;i<=k;i++)
    {
        ans*=double(m-i);
        ans/=double(n+1+i);
    }
    printf("%.4lf\n",1.0-ans);
    return 0;
}


#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if (k>=m)
    {
        printf("%.4lf\n",1);
        return 0;
    }
    if (n+k<m)
    {
        printf("%.4lf\n",0);
        return 0;
    }
    double ans=1.0;
    for (int i=0;i<=k;i++)
    {
        ans*=double(m-i);
        ans/=double(n+1+i);
    }
    printf("%.4lf\n",1.0-ans);
    return 0;
}


#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if (k>=m)
    {
        printf("1");
        return 0;
    }
    if (n+k<m)
    {
        printf("0");
        return 0;
    }
    double ans=1.0;
    for (int i=0;i<=k;i++)
    {
        ans*=double(m-i);
        ans/=double(n+1+i);
    }
    printf("%.4lf\n",1.0-ans);
    return 0;
}


#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <numeric>
#include <sstream>
#include <iostream>
using namespace std;

#define FOR(i,a,b) for(int i=(a); i<(int)(b); ++i)
#define sqr(a) ((a)*(a))
#define ArrAll(a) a, a + sizeof(a) / sizeof(a[0])
typedef long long i64;
typedef unsigned long long u64;

int nextInt() {
	int x;
	scanf("%d", &x);
	return x;
}

char s[1000100];

double solveDp(int n, int m, int k) {
	int N = n + m;
	vector<vector<double> > f(n + m + 1 + k, vector<double>(n + m + 1 + k, 0));
	for (int i = 0; i <= n + m; ++i) {
		f[0][i] = 1;
	}
	for (int i = 1; i <= n + m; ++i) {
		for (int j = 0; j <= n + m; ++j) {
			int t = i + j - n + m - k;
			if (t % 2 != 0 || t < 0 || t > 2 * n) {
				continue;
			}
			int restX = t / 2;
			int restY = i - restX;
			if (restY < 0) {
				continue;
			}

			double p1 = (double)restX / (restX + restY);
			double p2 = 1 - p1;
			if (j - 1 >= 0) {
				f[i][j] += p1 * f[i - 1][j - 1];
			}
			if (j + 1 <= n + m) {
				f[i][j] += p2 * f[i - 1][j + 1];
			}
		}
	}
	return f[n + m][k];
}

double solve(int n, int m, int k) {
	if (k < 0) {
		return 0;
	}
	if (k == 0) {
		if (n < m) {
			return 0;
		}
		double res = (n - m + 1.0) / (n + 1);
		return res;
	}

	double f1 = solve(n + 1, m - 1, k - 2) * m / (n + m + 1);
	double f2 = solve(n + 1, m, k - 1);
	double res = (f2 - f1) * (n + m + 1) / (n + 1);
	return res;
}

int main()
{
// 	{
// 	freopen("stdout.txt", "wt", stdout);
// 	int k = 5;
// 	for (int i = 0; i <= 20; ++i) {
// 		for (int j = 0; j <= 20; ++j) {
// 			//(i - j + 1.0) / (i + 1.0)
// 			printf("%.5lf  ", /*solveDp(i, j, k) - */solve(i, j, k));
// 		}
// 		printf("\n");
// 	}
// 	return 0;
// 	}
	int n = nextInt();
	int m = nextInt();
	int k = nextInt();

	double res = solve(n, m, k);
	printf("%.10lf\n", res);
	return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <memory.h>
#include <iomanip>
#include <string>
#include <cmath>
#include <map>
#include <utility>

using namespace std;

double getAns(int n, int m, int k) {
	string str;
	for (int i=0; i<n; i++)
		str += '(';
	for (int u=0; u<m; u++)
		str += ')';

	sort(str.begin(), str.end());

	long long res = 0;
	long long all = 0;
	do {
		int bal = 0;
		for (int i=0; i<str.size(); i++) {
			if (str[i] == '(') ++bal;
			else --bal;
			if (bal < -k) break;
		}

		if (bal >= -k) ++res;
		++all;
	} while (next_permutation(str.begin(), str.end()));

	cout << res << ' ' << all << endl;

	return (double)res / all;
}

int main() {
	//freopen("input.txt", "r", stdin);

	int n,m,k; cin >> n >> m >> k;

	double ans = 1;

	int up = m;
	int down = n + k + 1;
	for (int i=0; i<=k; i++) {
		ans *= static_cast<double>(up) / down;
		--up;
		--down;
	}

	cout << fixed << setprecision(5) << max(0.0, 1 - ans) << endl;

	return 0;
}


#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <numeric>
#include <string>
#include <cstring>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <iostream>
#include <iterator>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <sstream>
using namespace std;

#define REP(i,n) for (int i=0,_n=(n); i < _n; i++)
#define REPD(i,n) for (int i=(n)-1; i >= 0; i--)
#define FOR(i,a,b) for (int _b=(b), i=(a); i <= _b; i++)
#define FORD(i,a,b) for(int i=(a),_b=(b);i>=_b;i--)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))

#define CLEAR(x) memset(x,0,sizeof x);
#define CLEARA(x) memset(&x,0,sizeof x);
#define FILL(x,v) memset(x,v,sizeof x);
#define FILLA(x,v) memset(&x,v,sizeof x);

#define VAR(a,b) __typeof(b) a=(b)
#define FOREACH(it,c) for(VAR(it,(c).begin());it!=(c).end();++it)

#define REVERSE(c) reverse(ALL(c))
#define UNIQUE(c) SORT(c),(c).resize(unique(ALL(c))-(c).begin())
#define INF 0x7fffffff
#define X first
#define Y second
#define pb push_back
#define SZ(c) (int)(c).size()
#define MP make_pair
#define eps 1.0e-11
const double pi = acos(-1.0);

typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;

int n,m,k;

int main()
{
	scanf("%d%d%d",&n,&m,&k);
	double res;
	if (m<=k) res = 1.0;
	else if (m>n+k) res = 0.0;
	else
	{
		res = 1.0;
		FOR(i,0,k)
		{
			res /= n+i+1;
			res *= m-i;
		}
		res = 1-res;
	}
	printf("%.10lf\n",res);
	return 0;
}


#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <algorithm>
#include <bitset>
#include <set>
#include <sstream>
#include <stdlib.h>
#include <map>
#include <queue>
#include <assert.h>

using namespace std;

#define sz(x) ((int)x.size())
#define all(x) (x).begin(), (x).end()
#define pb(x) push_back(x)
#define mp(x, y) make_pair(x, y)

#define debug(x) cout << '>' << #x << ':' << x << endl;

typedef long long int64;

typedef vector <int> vi;
typedef pair<int, int> pi;
typedef vector < vi > vvi;

int main () {
	//freopen("machine.in", "rt", stdin);
	//freopen("machine.out", "wt", stdout);
    int n, m, k;
    cin >> n >> m >> k;
    double res = 1;
    if (k + n - m < 0) {
        cout << 0 << endl;
        return 0;
    }
    if (m <= k) {
        cout << 1 << endl;
        return 0;
    }
    for (int i = 0; i <= k; ++i) {
        res *= m - i;
        res /= n + 1 + i;
    }
    printf("%.6lf\n", 1 - res);
    return 0;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <bitset>
#include <string>
#include <vector>
#include <algorithm>
#include <ctime>
#include <queue>
#include <cstring>
#include <set>
#include <map>
#include <sstream>
#include <cmath>
#include <fstream>
#include <list>
using namespace std;
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define pb push_back
#define L(s) (int)s.size()
#define mp make_pair
#define pii pair<int,int>
#define x first
#define y second
#define inf 1000000000
#define VI vector<int>
#define ll long long
#define all(s) (s).begin(),(s).end()
#define C(u) memset((u),0,sizeof((u)))
#define ull unsigned ll
double d;
int n,m,k;
double a[222222];
double b[222222];
double ans=0;
int main()
{
	cin>>n>>m>>k;
	if (k>=m)
	{
		cout<<"1\n";
		return 0;
	}
	for(int i=0;i<n;++i)
		a[i]=i+1;
	for(int i=n;i<n+m;++i)
		a[i]=i+1-n;
	for(int i=0;i<m-k-1;++i)
		b[i]=i+1;
	for(int i=m-k-1;i<m-k-1+n+k+1;++i)
		b[i]=i+1-(m-k-1);
	d=1;
	for(int i=0,j=0;i<n+m||j<n+m;)
		if (i==n+m||(d>1&&j!=(n+m)))
			d=d/b[j++];
		else
			d=d*a[i++];
	cout<<max(0.0,1.0-d)<<endl;
}


#define _CRT_SECURE_NO_DEPRECATE
#include <iostream>
#include <bitset>
#include <string>
#include <vector>
#include <algorithm>
#include <ctime>
#include <queue>
#include <cstring>
#include <set>
#include <map>
#include <sstream>
#include <cmath>
#include <fstream>
#include <list>
using namespace std;
#define rp(i,n) for(int (i)=0;(i)<(n);++(i))
#define pb push_back
#define L(s) (int)s.size()
#define mp make_pair
#define pii pair<int,int>
#define x first
#define y second
#define inf 1000000000
#define VI vector<int>
#define ll long long
#define all(s) (s).begin(),(s).end()
#define C(u) memset((u),0,sizeof((u)))
#define ull unsigned ll
double d;
int n,m,k;
double a[222222];
double b[222222];
double ans=0;
int main()
{
	cin>>n>>m>>k;
	if (k>=m)
	{
		cout<<"1\n";
		return 0;
	}
	for(int i=0;i<n;++i)
		a[i]=i+1;
	for(int i=n;i<n+m;++i)
		a[i]=i+1-n;
	for(int i=0;i<m-k-1;++i)
		b[i]=i+1;
	for(int i=m-k-1;i<m-k-1+n+k+1;++i)
		b[i]=i+1-(m-k-1);
	d=1;
	for(int i=0,j=0;i<n+m||j<n+m;)
		if (i==n+m||d>1)
			d=d/b[j++];
		else
			d=d*a[i++];
	cout<<1.0-d<<endl;
}


#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <map>
#include <iostream>
#include <vector>
#include <set>
#include <functional>
#include <map>
#include <string>

using namespace std;

int main() {

#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

	int n, m, k;
	cin >> n >> m >> k;

	if (k >= m) {
		cout << 1;
		return 0;
	}

	if (n + k < m) {
		cout << 0;
		return 0;
	}

	long double p = 1;
	for (int i = 1; i <= k + 1; ++i) {
		p *= long double(m - k - 1 + i) / long double(n + i);
	}

	printf("%.10lf", 1 - p);

	return 0;
}


#include<iostream>
using namespace std;
int main(){
    int n, m, k;
    cin >> n >> m >> k;
    double ans = 1.;
    if(n + k < m)
        ans = 0;
    else
        for(int i = 0; i <= k; i++){
            ans *= (double)(m - i);
            ans /= (n + 1. + i);
        }
    cout << 1. - ans << endl;
    return 0;
}


#include<iostream>
using namespace std;
int main(){
    int n, m, k;
    cin >> n >> m >> k;
    double ans = 1.;
    for(int i = 0; i <= k; i++){
        ans *= (double)(m - i) / (n + 1. + i);
    }
    cout << 1. - ans << endl;
    return 0;
}


#include<iostream>
using namespace std;
int main(){
	int n, m, k;
	cin >> n >> m >> k;
	double ans = 1.;
	if(m > k)
		for(int i = 0; i <= k; i++){
			ans *= (double)(m - i);
			ans /= (double)(n + 1. + i);
		}
	else
		ans = 0;
	cout << 1. - ans << endl;
	return 0;
}


#include<iostream>
using namespace std;
int main(){
	int n, m, k;
	cin >> n >> m >> k;
	double ans = 1;
	if(m > k)
		for(int i = 0; i <= k; i++){
			ans *= (m - i);
			ans /= (n + 1 + i);
		}
	else
		ans = 0;
	cout.precision(5);
	cout << 1 - ans << endl;
	return 0;
}


#include<iostream>
using namespace std;
int main(){
    int n, m, k;
    cin >> n >> m >> k;
    double ans = 1.;
    if(n + k < m)
        ans = 1;
    else
        for(int i = 0; i <= k; i++){
            ans *= (double)(m - i);
            ans /= (n + 1. + i);
        }
    cout << 1. - ans << endl;
    return 0;
}


#include <iostream>
#include <ctime>
#include <string>
#include <vector>
#include <set>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstdlib>
#include <cstring>
#include <memory>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <list>
#include <complex>
#include <hash_map>
#include <hash_set>

#pragma comment (linker, "/STACK:1000000000")

using namespace std;

#define pb push_back
#define pob pop_back
#define rs resize
#define as assign
#define lwb lower_bound
#define upb upper_bound
#define mp make_pair
#define sz(a) a.size()
#define FOR(i, n) for (int i = 0; i < n; ++i)
#define FOD(i, n) for (int i = n - 1; i >= 0; --i)

typedef long long ll;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef vector <ll> vl;
typedef vector <vl> vvl;
typedef vector <bool> vb;
typedef vector <vb> vvb;
typedef vector <string> vs;
typedef vector <char> vc;
typedef vector <vc> vvc;
typedef vector <vvi> vvvi;
typedef vector <vvvi> vvvvi;
typedef vector <vvl> vvvl;
typedef vector <vvvl> vvvvl;
typedef vector <vvb> vvvb;
typedef double db;
typedef long double ldb;
typedef vector <db> vdb;
typedef vector <ldb> vldb;
typedef pair <int, int> ii;
typedef pair <int, char> ic;
typedef pair <ll, ll> lll;
typedef pair <int, ll> il;
typedef pair <ll, int> li;
typedef vector <ii> vii;
typedef vector <ic> vic;
typedef vector <vic> vvic;
typedef vector <vii> vvii;
typedef vector <lll> vll;
typedef vector <vll> vvll;
typedef set <int> si;
typedef set <ii> sii;
typedef set <pair <int, bool> > sib;
typedef vector <si> vsi;
typedef map <int, int> mii;
typedef map <string, char> msc;
typedef map <char, int> mci;
typedef queue <int> qi;
typedef deque <int> di;
typedef stack <int> sti;

const ll inf = (ll)1e18 + 7;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int n, m, k;
    cin >> n >> m >> k;
    ldb ans = 1;
    for (int i = 0; i <= k; ++i)
        ans *= ldb(m - i) / (n + i + 1); \
    cout << setprecision(5) << fixed;
    cout << 1 - ans;
    return 0;
}


#include <iostream>
#include <ctime>
#include <string>
#include <vector>
#include <set>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstdlib>
#include <cstring>
#include <memory>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <list>
#include <complex>
#include <hash_map>
#include <hash_set>

#pragma comment (linker, "/STACK:1000000000")

using namespace std;

#define pb push_back
#define pob pop_back
#define rs resize
#define as assign
#define lwb lower_bound
#define upb upper_bound
#define mp make_pair
#define sz(a) a.size()
#define FOR(i, n) for (int i = 0; i < n; ++i)
#define FOD(i, n) for (int i = n - 1; i >= 0; --i)

typedef long long ll;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef vector <ll> vl;
typedef vector <vl> vvl;
typedef vector <bool> vb;
typedef vector <vb> vvb;
typedef vector <string> vs;
typedef vector <char> vc;
typedef vector <vc> vvc;
typedef vector <vvi> vvvi;
typedef vector <vvvi> vvvvi;
typedef vector <vvl> vvvl;
typedef vector <vvvl> vvvvl;
typedef vector <vvb> vvvb;
typedef double db;
typedef long double ldb;
typedef vector <db> vdb;
typedef vector <ldb> vldb;
typedef pair <int, int> ii;
typedef pair <int, char> ic;
typedef pair <ll, ll> lll;
typedef pair <int, ll> il;
typedef pair <ll, int> li;
typedef vector <ii> vii;
typedef vector <ic> vic;
typedef vector <vic> vvic;
typedef vector <vii> vvii;
typedef vector <lll> vll;
typedef vector <vll> vvll;
typedef set <int> si;
typedef set <ii> sii;
typedef set <pair <int, bool> > sib;
typedef vector <si> vsi;
typedef map <int, int> mii;
typedef map <string, char> msc;
typedef map <char, int> mci;
typedef queue <int> qi;
typedef deque <int> di;
typedef stack <int> sti;

const ll inf = (ll)1e18 + 7;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int n, m, k;
    cin >> n >> m >> k;
    ldb ans = 1;
    for (int i = 0; i <= k; ++i)
        ans *= ldb(m - i) / (n + i + 1); \
    cout << setprecision(5) << fixed;
    cout << max((ldb)0, 1 - ans);
    return 0;
}


#include <iostream>
#include <ctime>
#include <string>
#include <vector>
#include <set>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstdlib>
#include <cstring>
#include <memory>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <list>
#include <complex>
#include <hash_map>
#include <hash_set>

#pragma comment (linker, "/STACK:1000000000")

using namespace std;

#define pb push_back
#define pob pop_back
#define rs resize
#define as assign
#define lwb lower_bound
#define upb upper_bound
#define mp make_pair
#define sz(a) a.size()
#define FOR(i, n) for (int i = 0; i < n; ++i)
#define FOD(i, n) for (int i = n - 1; i >= 0; --i)

typedef long long ll;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef vector <ll> vl;
typedef vector <vl> vvl;
typedef vector <bool> vb;
typedef vector <vb> vvb;
typedef vector <string> vs;
typedef vector <char> vc;
typedef vector <vc> vvc;
typedef vector <vvi> vvvi;
typedef vector <vvvi> vvvvi;
typedef vector <vvl> vvvl;
typedef vector <vvvl> vvvvl;
typedef vector <vvb> vvvb;
typedef double db;
typedef long double ldb;
typedef vector <db> vdb;
typedef vector <ldb> vldb;
typedef pair <int, int> ii;
typedef pair <int, char> ic;
typedef pair <ll, ll> lll;
typedef pair <int, ll> il;
typedef pair <ll, int> li;
typedef vector <ii> vii;
typedef vector <ic> vic;
typedef vector <vic> vvic;
typedef vector <vii> vvii;
typedef vector <lll> vll;
typedef vector <vll> vvll;
typedef set <int> si;
typedef set <ii> sii;
typedef set <pair <int, bool> > sib;
typedef vector <si> vsi;
typedef map <int, int> mii;
typedef map <string, char> msc;
typedef map <char, int> mci;
typedef queue <int> qi;
typedef deque <int> di;
typedef stack <int> sti;

const ll inf = (ll)1e18 + 7;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int n, m, k;
    cin >> n >> m >> k;
    ldb ans = 1;
    for (int i = 0; i <= k; ++i)
        ans *= ldb(m - i) / (n + i + 1); \
    cout << setprecision(5) << fixed;
    cout << max((ldb)0, 1 - ans;
    return 0;
}


#include <iostream>
#include <ctime>
#include <string>
#include <vector>
#include <set>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstdlib>
#include <cstring>
#include <memory>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <list>
#include <complex>
#include <hash_map>
#include <hash_set>

#pragma comment (linker, "/STACK:1000000000")

using namespace std;

#define pb push_back
#define pob pop_back
#define rs resize
#define as assign
#define lwb lower_bound
#define upb upper_bound
#define mp make_pair
#define sz(a) a.size()
#define FOR(i, n) for (int i = 0; i < n; ++i)
#define FOD(i, n) for (int i = n - 1; i >= 0; --i)

typedef long long ll;
typedef vector <int> vi;
typedef vector <vi> vvi;
typedef vector <ll> vl;
typedef vector <vl> vvl;
typedef vector <bool> vb;
typedef vector <vb> vvb;
typedef vector <string> vs;
typedef vector <char> vc;
typedef vector <vc> vvc;
typedef vector <vvi> vvvi;
typedef vector <vvvi> vvvvi;
typedef vector <vvl> vvvl;
typedef vector <vvvl> vvvvl;
typedef vector <vvb> vvvb;
typedef double db;
typedef long double ldb;
typedef vector <db> vdb;
typedef vector <ldb> vldb;
typedef pair <int, int> ii;
typedef pair <int, char> ic;
typedef pair <ll, ll> lll;
typedef pair <int, ll> il;
typedef pair <ll, int> li;
typedef vector <ii> vii;
typedef vector <ic> vic;
typedef vector <vic> vvic;
typedef vector <vii> vvii;
typedef vector <lll> vll;
typedef vector <vll> vvll;
typedef set <int> si;
typedef set <ii> sii;
typedef set <pair <int, bool> > sib;
typedef vector <si> vsi;
typedef map <int, int> mii;
typedef map <string, char> msc;
typedef map <char, int> mci;
typedef queue <int> qi;
typedef deque <int> di;
typedef stack <int> sti;

const ll inf = (ll)1e18 + 7;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int n, m, k;
    cin >> n >> m >> k;
    ldb ans = 1;
    for (int i = 0; i <= k; ++i)
        ans *= ldb(m - i) / (n + i + 1);
    if (ans < 0)
        cout << 1;
    else
    {
        cout << setprecision(5) << fixed;
        cout << 1 - ans;
    }
    return 0;
}


#include <iostream>

using namespace std;
int main()
{
	int n,m,k,i,j;
	while (scanf("%d %d %d",&n,&m,&k)!=EOF)
	{
		if(k>=m)
		{
			printf("1\n");
			continue;
		}
		double ans = 1;
		for (i=0;i<=k;i++)
		{
			ans *= m-i;
			ans /= n+i+1;
		}
		printf("%.4lf\n",1.0-ans);
	}

}