How could the following function be written using iteration instead of recursion?

```
function mystery(b)
{
    if b == 0 then 
       return 0 
    if (b / 2 == 0)
       return mystery (b-1) + 3
    else 
       return mystery (b-1) + 2
}

```