#include <stdio.h>
#include <stdlib.h>
int main()
{
int soma = 0, i, num;
if (num > 0) {
for (i = 3; i <= num; i=i+6) {
soma+=i;
}
} else {
for (i = -3; i >= num; i=i-6) {
soma+=i;
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKCkKewogICAgaW50IHNvbWEgPSAwLCBpLCBudW07CiAgICBzY2FuZigiJWkiLCAmbnVtKTsKICAgIGlmIChudW0gPiAwKSB7CiAgICAgICAgZm9yIChpID0gMzsgaSA8PSBudW07IGk9aSs2KSB7CiAgICAgICAgICAgIHByaW50ZigiJWkgIiwgaSk7CiAgICAgICAgICAgIHNvbWErPWk7CiAgICAgICAgfQogICAgfSBlbHNlIHsKICAgICAgICBmb3IgKGkgPSAtMzsgaSA+PSBudW07IGk9aS02KSB7CiAgICAgICAgICAgIHByaW50ZigiJWkgIiwgaSk7CiAgICAgICAgICAgIHNvbWErPWk7CiAgICAgICAgfQogICAgfQogICAgcHJpbnRmKCJcblNvbWE6ICVpIiwgc29tYSk7CgoKICAgIHJldHVybiAwOwp9Cg==