#include <iostream>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <algorithm>
using namespace std;
#define MAXN 111111
#define LL long long
struct node
{
LL a, b;
}thing[MAXN];
int cmp( node x, node y)
{
return x.b < y.b;
}
int main()
{
LL n, r, avg;
while(scanf("%lld %lld %lld",&n, &r ,&avg) != EOF)
{
LL res = 0;
LL ans = 0;
for( LL i = 0; i < n; i++)
{
scanf("%lld %lld",&thing[i].a, &thing[i].b);
res += thing[i].a;
}
if(res >= avg * n)
{
printf("0\n");
continue;
}
else
{
sort(thing, thing + n,cmp);
LL tmp = avg * n - res;
for( LL i = 0; i < n && tmp > 0; i++)
{
if(thing[i].a < r)
{
if(tmp > ( r - thing[i].a))
{
ans += thing[i].b *(r - thing[i].a);
tmp -= (r - thing[i].a);
}
else
{
ans += tmp * thing[i].b;
tmp = 0;
}
}
}
printf("%lld\n",ans);
}
}
return 0;
}
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <algorithm>
using namespace std;
#define MAXN 111111
#define LL long long
struct node
{
LL a, b;
}thing[MAXN];
int cmp( node x, node y)
{
return x.b < y.b;
}
int main()
{
LL n, r, avg;
while(scanf("%lld %lld %lld",&n, &r ,&avg) != EOF)
{
LL res = 0;
LL ans = 0;
for( LL i = 0; i < n; i++)
{
scanf("%lld %lld",&thing[i].a, &thing[i].b);
res += thing[i].a;
}
if(res >= avg * n)
{
printf("0\n");
continue;
}
else
{
sort(thing, thing + n,cmp);
LL tmp = avg * n - res;
for( LL i = 0; i < n && tmp > 0; i++)
{
if(thing[i].a < r)
{
if(tmp > ( r - thing[i].a))
{
ans += thing[i].b *(r - thing[i].a);
tmp -= (r - thing[i].a);
}
else
{
ans += tmp * thing[i].b;
tmp = 0;
}
}
}
printf("%lld\n",ans);
}
}
return 0;
}