#include <stdio.h>
int sum(int n);
int main() {
int n, add;
printf("Enter a value of n: ");
scanf("%d", &n);
add = sum(n);
printf("%d", add);
return 0;
}
int sum(int n) {
if (n == 1 || n == 0) return 1;
int addans = n + sum(n - 1);
return addans;
}