import java.util.*;
public class Main{
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()){
            int n = in.nextInt();//n门课
            int r = in.nextInt();//满分分数
            int avg = in.nextInt();//可获得奖学金的平均分数
            int[][] arr = new int[n][2];//
            for (int i = 0; i < n; i++) {//每门课的具体分数和复习加分情况
               arr[i][0] = in.nextInt();
               arr[i][1] = in.nextInt();
            }
            //按复习代价从小到达排序
            Arrays.sort(arr, Comparator.comparingInt(o -> o[1]));
            //按照思路,要想使复习时间最少,优先选择复习时间少的课程复习
            //首先判断是否已经满足要求,满足的话就不用复习
            long sum = 0;//平时成绩总分
            for (int i = 0; i < n; i++) {
                sum += arr[i][0];
            }
            int k = 0;
            long time = 0;//复习时间
            long limit = avg * n;//需要达到的最低总分要求
            while (sum < limit){
                int temp = r - arr[k][0];//当前课程可以复习的分数
                if (sum + temp >= limit){//如果复习当前课程到满分,达到了要求
                    time += (limit -sum) * arr[k][1];
                    sum = limit;//跳出循环
                }else {//如果复习当前课程到满分,还没有达到要求
                    time += temp * arr[k][1];
                    sum += temp;
                    k++;
                }
            }
            System.out.println(time);
        }
    }
}