#include "stdio.h"
#include "math.h"
int main(void){
int n,i;
double sum;
while(1){
printf("Input n(int n>0)...\nn=");
if(scanf("%d",&n) && n>0){
for(sum=1.0,i=2;i<=n;sum+=sqrt(i++));
printf("The result is %.2f\n",sum);
break;
}
printf("Error, must be n>0: ");
fflush(stdin);
}
return 0;
}