You are given a function which contains a non-working while loop. The function
also accepts a positive integer (x). The while loop is in an infinite loop state, which
would be unwise to run. The while loop continually decreases the value variable
by 1. Your task is to fix the code so that the loop exits and returns the value
variable when it is equal to x.