fixed64 r50c (fixed64 price)
{
  fixed rem = price %% 1;

  n = price % 1;

  if (rem < 0.25)
  {
    rem = 0;
  }
  else
  {
    if (rem < 0.75)
    {
      rem = 0.5;
    }
    else
    {
      rem = 1;
    }
  }

  return n + rem;
}