#include int main() { int pocky = 0; int mouse = 0; // 値取得 scanf("%d %d", &pocky, &mouse); // 結果表示 if (pocky % mouse == 0 && pocky / mouse % 2 == 0) printf("%d", pocky / mouse / 2 * mouse - mouse); else printf("%d", pocky / mouse / 2 * mouse); return 0; }