\displaystyle y=\cases{d, &n - neparno\cr d\over{2}, &n - parno}