#include <stdio.h> int main() { int n = 0; scanf("%d", &n); int i = 0, flag = 1, tem = 1; float sum = 0.0f, result = 0.0f; for (i = 1; i <= n; i++) { sum += flag * tem; result += 1.0 / (sum); flag = -flag; tem += 2; } printf("%.3f", result); return 0; }