四舍五入
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5+9;
double c[N];
int main()
{
int n,m,p;
cin>>n>>m>>p;
for(int i=0;i<n;i++)
{
double a,b;
scanf("%lf%lf",&a,&b);
c[i] = a*0.85 + b*0.15;
}
sort(c,c+n,greater<double>());
double tmp = (c[m-1]- p*0.15)/0.85;
if(tmp<=0) puts("0");
else
printf("%.f\n",tmp+0.5);
return 0;
}