// $Id: random.csharp,v 1.0 2002/02/14 13:42:00 dada Exp $
// http://dada.perl.it/shootout/

using System;

class App {

    public static int IM = 139968;
    public static int IA = 3877;
    public static int IC = 29573;
    public static long last = 42;


    public static double gen_random(double max) {        
        last = (last * IA + IC) % IM;
        return( max * last / IM );
    }

    public static int Main(String[] args) {
        int n;
        double result = 0;

        n = System.Convert.ToInt32(args[0]);
        if(n < 1) n = 1;

        while (n-->0) {
            result = gen_random(100.0);
        }
        Console.WriteLine(result.ToString("F9"));

        return(0);
    }
}