#include <stdio.h>
int fun(int a, int b)
{
int max = a > b ? a : b;
int min = a > b ? b : a;
int sum = 0;
for (int i = min; i <= max; i++)
{
sum += i;
}
return sum;
}
int main()
{
int a, b;
scanf("%d%d", &a, &b);
printf("sum=%d", fun(a, b));
return 0;
}
int main()
{ int a, b; int max,min; int sum = 0; scanf("%d %d", &a, &b); max = a > b ? a : b; min = a > b ? b : a; for (int i = min; i <= max; i++) { sum += i; } printf("sum=%d", sum); return 0;
}