lib C fun strtoll(s : UInt8*, p : UInt8**, b : Int32) : Int64 end class String def to_i64 C.strtoll(self, nil, 10) end end k = read_line.to_i64 puts (1..100000).sum { |n| Math.sin(k * n) / (n.to_f**n) }