Guess The Number

I have a number between 1~N. You ask Y/N question about numbers.
I can lie at most once.
How many questions needed to get the number?

Choose N