>>967
#include <stdio.h>

int main(void)
{
int m, n, total;

printf("数値を入力してください");
scanf("%d", &m);
printf("今入力した数値以上の数値を入力してください");
scanf("%d", &n);

total = 0;
m=(m+2)/3*3; // m を 3 の倍数にする ※ここ重要
// while(m%3!=0) m++; でも可
while(m <= n)
{
total = total + m;
m = m + 3;
}
printf("%d", total);

return 0;
}