手工计算也不是不行

#include <iostream>
using namespace std;

int main() {
    int a;cin>>a;
    cout<<-1*a/2+a%2*a;
}
// 64 位输出请用 printf("%lld")