mirror of
https://github.com/nolongeractivemp3/shipthatcode-c.git
synced 2026-11-24 10:45:12 +01:00
17 lines
246 B
C
17 lines
246 B
C
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
int n;
|
|
scanf("%d", &n);
|
|
long long result = 0;
|
|
long imat = 1;
|
|
while (!(imat>n)) {
|
|
result = result +imat;
|
|
imat = imat+2;
|
|
|
|
}
|
|
|
|
printf("%lld", result);
|
|
return 0;
|
|
}
|