using static System.Math; using System; public class Hello { static void Main() { var p = double.Parse(Console.ReadLine().Trim()); if (p == 0) { Console.WriteLine(0); goto exit; } var r = 1d; var res = 0d; while (r > 0.00001) { r *= p; res += r; } var result = Round(res, 1, MidpointRounding.AwayFromZero); Console.WriteLine(result); exit:; } }