n,p,k=map(int,input().split()) x=10**18 q=[-1]*(k+1) q[0]=p g=-1 for _ in range(n): t,b=map(int,input().split()) for i in reversed(range(k)): if q[i]!=-1: tt=t*a[i]+b if tt<=x: q[i+1]=max(q[i+1],tt) if q[k]<=x: g=max(g,q[k]) print(g)