import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String vehicleType = sc.nextLine();
        double distance = sc.nextDouble();
        double speed = sc.nextDouble();
        if (speed <= 0 || distance < 0) {
            System.out.println("-1");
            return;
        }int trafficFactor = 0;
        if (vehicleType.equalsIgnoreCase("Car")) {
            trafficFactor = 10;
        } else if (vehicleType.equalsIgnoreCase("Bike")) {
            trafficFactor = 20;
        } else if (vehicleType.equalsIgnoreCase("Train")) {
            trafficFactor = 5;
        } else {
            System.out.print("-1");
            return;
        }
        int time = (distance / speed) * (1 + TRAFFIC_FACTOR / 100);
        System.out.printf("%.2f", time);
    }
}
