// Задача "Ноутбук"
// 3-я личная Интернет-олимпиада сезона 2009/2010
// Автор задачи: Владимир Ульянцев, ulyantsev@rain.ifmo.ru
// Автор решения: Маским Носенко, nosenkomax@gmail.com

import java.util.*;
import java.io.*;

public class notebook_mn implements Runnable {

	public static void main(String args[]) {
		new Thread(new notebook_mn()).start();
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	private String FNAME = "notebook";
	boolean eof = false;

	@Override
	public void run() {
		try {
			Locale.setDefault(Locale.US);
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			br.close();
			out.close();

		} catch (Exception e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	long nextLong() {
		return Long.parseLong(nextToken());
	}

	double nextDouble() {
		return Double.parseDouble(nextToken());
	}

	void My_Assert(boolean b, String s) {
		if (!b)
			throw new Error("Assertion " + s);
	}

	private void solve() {
		int n = nextInt();
		int D = nextInt(); 
		int	U = nextInt();
		int MIN = 0;
		int MAX = D * U;
		
		int t = MAX;
		int last = 0;
		boolean down = false;
		for (int i = 0; i <= n; i++) {
			int now;
			if (i != n)
				now = time(nextToken());
			else
				now = time("23:59");
			if (down)
				t -= (now - last) * U;
			else
				t += (now - last) * D;
			
			if (t < MIN)
				t = MIN;
			if (t > MAX)
				t = MAX;
			
			down = !down;
			last = now;
		}
		
		out.println(100.0 * t / MAX);
		
	}

	private int time(String s) {
		return Integer.valueOf(s.substring(0, 2)) * 60 + Integer.valueOf(s.substring(3, 5));
	}
}