#include <stdio.h>

int main(void) {
    int n; 
    double sum = 0.0;

    printf("Enter the value of n: ");
    scanf("%d", &n);

    for (int i = 1; i <= n; i++) {
        sum += 1.0 / (i * (i + 1)); 
    }
    
    printf("Sum of the first %d terms of the series: %.4f\n", n, sum);
    
    return 0;
}
