package main import . "fmt" func main() { var p float64 Scan(&p) var e,q float64 q=1 for i:=1; i<1e6; i++ { e += q*p*float64(i) q *= p } Printf("%.8f\n", e) }