class Test { static function main() { var n: Float = 11; var counter: Int = 0; while (n > 1){ if (n % 2 == 0) n /= 2 else n += 1; counter++; } trace(counter); } }