uses crt;
var m,n,t,i:integer;
begin
clrscr;
write('Nhap m='); readln(m);
write('Nhap n='); readln(n);
t:=0;
for i:=m to n do
if i mod 2=0 then t:=t+i;
writeln('Tong cac so chan tu ',m,' den ',n,' la: ',t);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long n,i,t;
int main()
{
cin>>n;
if (n%2==0)
{
t=0;
for (i=1; i<=n; i++) if (i%2==0) t+=i;
}
else
{
t=0;
for (i=1; i<=n; i++) if (i%2!=0) t+=i;
}
cout<<t;
return 0;
}