Given an infinite numberline, you start at zero. On every $i$-th move you can either move $i$ places to the right, or $i$ places to the left. How, in general, would you calculate the minimum number of moves to get to a target point $x$? For example:

If $x = 9$:

Move $1$: Starting at zero, move to $1$

Move $2$: Starting at $1$, move to $3$

Move $3$: Starting at $3$, move to $0$

Move $4$: Starting at $0$, move to $4$

Move $5$: Starting at $4$, move to $9$