program xmz;
var
f1,f2:text;
w,ws:array[-1..1000]of int64;
t,l,n,a,b,c:longint;
s:array[0..1000]of real;
f:array[0..1000]of real;
max:real;
begin
assign(f1,'convoy.in');assign(f2,'convoy.out');
reset(f1);rewrite(f2);
read(f1,t,l,n);
for a:=1 to n do
begin
read(f1,w[a],s[a]);
s[a]:=(l/s[a])*60;
ws[a]:=w[a]+ws[a-1];
end;
for a:=1 to n do
begin
f[a]:=f[a-1]+s[a];
b:=a-1;max:=s[a];
while (ws[a]-ws[b-1]<=t)and(b>0) do
begin
if max<s[b] then max:=s[b];
if f[a]>f[b-1]+max then
f[a]:=f[b-1]+max;
dec(b);
end;
end;
write(f2,f[n]:0:1);
close(f1);close(f2);
end.