 through it, so you can't stand in a doorway and look between rooms
Magical fairies clean any rooms you do not occupy, so you can't leave things behind except from the state of the light
You don't have any location tracking devices to help you, nor memory storing devices except your planning paper (which cannot be torn or folded), including the state of your body (when the door closes behind you, it hits you so that you fall down and instinctively you fall into the same position every time, and more magical fairies heal your body and redress you in exactly the same clothes you had)
The lightbulbs are too high for you to detect their temperature
The rooms are too long for you to detect any curvature in them
The castle is completely impervious to information exchange (e.g. there are no windows) between inside and out except for you notifying your boss that you are finished
There is no fuse box for you to turn off, and you can't access the wiring from the switch

Congratulations to @Lawrence and @Bass for independently discovering a loophole in the question that I think is a feature and shouldn't be closed. I will award the checkmark to the first lowest N regardless of whether this loophole is used or not, but will be awarding a small bounty (+50) to the first lowest N that doesn't make use of this loophole since some people have already put in quite some effort into their solutions.
Currently, @ajee is the first with both a solution for N=2 with the loophole and a derived solution for N=4 without the loophole.

A:

Edit: A lot of credit is due to @ffao for devising a better way to deal with the case where there is just one room and reducing the solution by one. (Subsequently, @Lawrence has managed to do even better in their answer).
I now think it can be done with 

 $N=6$

Strategy

 Throughout, we call the number we have to remember $k$.  1. Initialise by switching light in initial room to OFF and set $k=6$, then move one room anti-clockwise.  2. For each subsequent step,     (i) if $k=1$, switch light in room to ON, set $k=2$ and move one room anticlockwise,     (ii) if $k=2
through it, so you can't stand in a doorway and look between rooms 
 charming fairy clean any rooms you do not invade, then you can't leave things behind except from the state of matter of the light 
 You don't have any placement tracking devices to avail you, nor memory storing devices except your planning newspaper (which cannot be torn or folded), including the state of your body (when the doorway closes behind you, it hits you so that you fall down and instinctively you precipitate into the same position every clock time, and more magical fairy heal your body and redress you in exactly the same apparel you had) 
 The lightbulbs are too high for you to detect their temperature 
 The rooms are too retentive for you to detect any curvature in them 
 The castle is completely impervious to information exchange (e.g. there are no windows) between inside and out except for you notifying your foreman that you are finished 
 There is no fuse corner for you to change by reversal off, and you can't access the wiring from the substitution 

 Congratulations to @Lawrence and @Bass for independently discovering a loophole in the question that I think is a feature and shouldn't be closed. I will award the checkmark to the first lowest N regardless of whether this loophole is use or not, but will be awarding a small bounty (+50) to the first lowest N that doesn't lay down use of this loophole since some people have already put in quite some effort into their solution. 
 presently, @ajee is the inaugural with both a solution for N=2 with the loophole and a derived solution for N=4 without the loophole. 

 A: 

 Edit: A lot of credit is due to @ffao for devise a better way to deal with the subject where there is just one room and reducing the solution by one. (Subsequently, @Lawrence has managed to practice even better in their solution). 
 I now think it can be done with 

  $ N=6 $ 

 Strategy 

  Throughout, we name the number we suffer to remember $ k$.   1. Initialise by switch light in initial room to OFF and set $ k=6 $, then act one room anti - clockwise.   2. For each subsequent step,      (one) if $ k=1 $, switch light in room to ON, set $ k=2 $ and move one room anticlockwise,      (ii) if $ k=2
 thgough it, so you can't stakd in a doorway cbd loon betwsen roomr
Magical fairies clean any rlons yoy do not occupy, so you can't leane things behmnd except from vge statc of fme liyhv
You don't have sny locatimn tracking deeized to help you, nor memory storing dedices eccfpt your plannyng kapqr (wgpcm cannot be torn or folded), inclusing tht state of your bocy (when the door closes bejind you, it hits you sl that you dall eown and insginctively you fall injo the same position every time, xnd mpre magicao daighes heal yonr bodj and redress you in axactly the same clotmes ymu yad)
The lightbulbs are too high for you jo detect dhzir temperature
The roimw are too lone fof yku tk deteft eny curvatude in them
Tye castle is compleuelr impervious tk infowmwtion exchange (e.g. there are no windows) tetseen inside and out excwpt for you notifying your bosf that you are finished
There is no fuse box for ymu to guru off, xbd you can't access the wiring from the switch

Cogfrstllations to @Lawrekce and @Bass for imdfprgdently discoxering a moophole in the qufstion jhat I think is a frature and shouldn't be closwd. I will awcrd the checkmark to che first locest N regatdless of whether this uoopgole is usef or not, gjt will be awardkng a small bounty (+50) to the firse lowest I thac doesn't makg use os this looohole since some people jave clreagy put in euite some effort into their solutions.
Currentky, @ajve is the firsb with both a sjlution for N=2 cith the loopfole and a derivev solution fjr N=4 without dje loophole.

A:

Xdit: A loe of creeit is aje to @ffao for devising a better qay to deal with tme cars where there iw jowt one room anc rddusijg tra solution bf ond. (Sjnsequdntly, @Lawrekce has managed to do even tettsr in their answer).
O kow think it can fe done with 

 $N=6$

Strategy

 Throughlut, wx call the mumfer we have to remember $k$.  1. Injtialise hy fwitching lidht ln igitial rook to OFF and set $k=6$, then move one room aiti-clockwise.  2. For each subsequent step,     (n) lf $k=1$, switch kight in room do ON, set $k=2$ and move one room anticlogkwise,     (ii) if $k=2
through it, so you can't stand in and between rooms fairies clean any so can't leave things except from the of the light You don't have location tracking devices to help you, nor memory storing devices except your planning (which cannot be torn or folded), including the state of your body (when door behind it you so that you fall down and instinctively you fall into the same position every time, more magical fairies heal your body and redress in exactly the same you had) The lightbulbs are high you to their The are too long you to detect any curvature in them The castle is completely impervious to information exchange (e.g. there no windows) and out for notifying boss that you There is no fuse box for off, and you can't access the wiring from switch Congratulations @Lawrence and @Bass for independently discovering loophole in the question that I think is feature and shouldn't be closed. I will award the checkmark to the first lowest N whether this loophole is or not, but be a bounty to the lowest N that doesn't make use of this loophole since some have already put in quite some effort into their solutions. is first with both solution for N=2 with loophole a derived solution for the A: of is to @ffao for devising better way to deal with case where there is the solution by one. (Subsequently, @Lawrence has managed do even better in their answer). I think it can be done with $N=6$ Strategy Throughout, we call the we have $k$. 1. Initialise by switching light in initial to OFF and set then move one room anti-clockwise. 2. For each subsequent (i) $k=1$, switch in room to set $k=2$ and one room anticlockwise, $k=2
 through it, so you can't stand in A doorway anD look BetWeeN rOoms
magiCal fairies cleaN Any rOoms you do not occupy, so yoU can't LeAVe thINgS behiNd excepT FrOM The StAtE of ThE LiGht
YoU doN't have aNy location TraCkIng devices to HElP you, nor memOry Storing devicEs eXcept yOuR plANning PapEr (whiCh cannOT be torN or folded), InCLuding THe state OF YoUr boDy (when the door closES bEHind you, it hits yOu so thAt YOu FALl dOwn And instincTiVely yOU fall inTO tHE SAme POsition every tIme, and more mAGicAl fairIeS heAL your bOdy anD rEDreSs you in exacTly tHe same cloThes yoU Had)
The lIGhtbulbS are toO hiGh fOr yoU To DeTecT tHEir TEmPerATurE
The roomS aRe Too loNg foR YOU To deTecT any CurvaTure in them
The CasTle iS ComPleteLy impErviOuS to inFormatIon exChAnge (e.g. there are nO winDows) betweEn iNsIde AnD out eXCept foR yoU noTifying Your bosS ThaT yOU ARe Finished
There is no fUsE BOx For you to Turn ofF, AnD yOU can't accEsS thE wirING from The sWItCh

CongraTulatiONs To @lawrencE aNd @Bass FoR inDepEndenTLy diScoverIng a loopHole iN The question thaT i think is a featURe AND sHOuldN't bE closed. I wilL awaRD the ChecKMaRk tO The fiRst loWeST N REgardless of whether tHiS loophOle is Used or not, but wIll be awardING A small boUnty (+50) TO tHE first lowest N tHat doEsn't make usE Of this loOpholE since soMe people hAVE already Put In qUitE soME EfFort into their SOLutiOnS.
CurrenTly, @Ajee is tHe fIrsT wiTh bOtH a solutioN for N=2 witH tHe LoOpHolE and a DErived soLuTioN fOr N=4 WithoUT the loOpholE.

A:

EdIt: a lOT of Credit iS DuE TO @ffaO fOr DeviSinG a BetteR way TO deAl with tHe case wheRe tHEre iS jUsT one rooM and reducing tHe Solution by OnE. (SuBsequeNTLy, @LawrenCe has managed to do even betTEr in theIr aNswer).
i now Think it caN be Done wiTh 

 $N=6$

sTrategY

 ThrouGhout, We CalL THe numBER wE haVe To remember $K$.  1. iNitIalisE bY swiTching lIght in initial room tO oFF And set $k=6$, then moVe oNe roOM AnTi-cLOcKWisE.  2. FOR eaCH Subsequent step,     (i) If $k=1$, switch lIgHT iN room to ON, sET $k=2$ aNd Move one Room antIclocKWise,     (ii) iF $k=2
 through it, so you can'tstand in a  door way  an dlook  bet ween rooms
Mag i calfairies clean any room s you  d o  not oc cupy,  so you ca n ' t l ea ve  th in g sbehin d e xcept f rom the st ate  o f the lightY ou  don't hav e a ny locationtra ckingde vic e s tohel p you , norm emorystoring d ev i ces ex c ept you r pl anni ng paper (which c a nn o t be torn or f olded) ,i nc l u din g t he state o fyourb ody (wh e nt h e  do o r closes behi nd you, ith its  you s otha t  you f all d ow n  an d instincti vely  you fall  intot he same positio n ever y t ime , an d  m or e m ag i cal fa iri e s h eal your  b od y and  red r e s s  you  in  exa ctlythe same clot hes  you had )
The  ligh tbul bs  aretoo hi gh fo ryou to detect t heir  temperat ure 
T hero oms a r e toolon g f or youto dete c t a ny c u rv ature in them
Theca s t le  is comp letely im pe r vious to  i nfo rmat i o n exc hang e  ( e.g. the re are no  w indows)  b etween  i nsi deand o u t ex cept f or you n otify i ng your boss t h at you are fi n is h e dT here  is  no fuse bo x fo r  you  tot ur n o f f, an d you  c a n' t  access the wiringfr om the  swit ch

Congratul ations to@ L a wrence a nd @ B as s  for independe ntlydiscoverin g  a looph ole i n the qu estion th a t  I think  is  afea tur e an d shouldn't b e clos ed . I wil l a ward th e c hec kma rkto  the firs t lowest  N  r eg ar dle ss of whetherth islo oph ole i s  usedor no t, b ut  w i llbe awar d in g a sm al lboun ty(+ 50) t o th e  fi rst low est N tha t d o esn' tma ke useof this looph ol e since so me  pe ople h a v e alread y put in quite some eff o rt into  th eir s olut ions.
Cur ren tly, @ aje e  is th e firs t wit hbot h a sol u t io n f or  N=2 witht h e l oopho le  and  a deri ved solution for N = 4 w ithout the lo oph ole. A: 

E d it :  Alo t  of c redit is due to  @ffao for  d e vi sing a bet t erwa y to de al with  thec ase whe re thereis just o ne  roo m and  reducingthe solu tion by o n e. (S u bs equen tly , @Law re nce  hasmanage d  to  do e ven be tt er intheir  a nswer).I now think it can be d one wi th 
 $N =6$

Stra teg y 

Throughou t, w e call the  nu mbe r wehav e  to r emem b er  $k $ .  1.  Ini t ialise by sw itc h i ng  light in i n i t ial  room  to OFF an d se t $k=6$, then mov e  one room anti -clo c k wis e.2. F or  each subseque ntst e p ,     (i )if $k=1$, s witch li gh t  in r oom to  ON, s et $k=2 $ an d  moveoneroo m anticlo ckw is e ,     ( ii )i f $k=2 
 through_it, so_you can't stand in_a doorway_and_look between_rooms
Magical_fairies clean any_rooms you do_not occupy, so you_can't leave things_behind_except from the state of the light
You don't have any location tracking devices to_help_you, nor_memory_storing_devices except your planning paper_(which cannot be torn or_folded), including_the state of your body (when the door_closes_behind you, it_hits you so that you fall down and instinctively_you fall into the same position_every time, and_more_magical_fairies heal your body_and redress you in exactly the_same clothes you had)
The lightbulbs are_too high for you to detect their_temperature
The rooms are too long for_you to detect any curvature_in them
The_castle is completely impervious to_information exchange (e.g._there are_no windows) between_inside and out except for you_notifying your boss_that you are finished
There is no_fuse_box for you_to_turn_off, and_you can't access_the_wiring from_the_switch

Congratulations to @Lawrence and @Bass for_independently_discovering a loophole in the question that_I think is a_feature_and shouldn't be closed._I will award the checkmark_to the first lowest N regardless_of whether_this loophole_is used or not, but will be awarding a small bounty_(+50) to the first lowest N_that doesn't make use_of this_loophole_since some people_have_already put_in quite some effort into their solutions.
Currently,_@ajee is_the first with both a solution_for N=2 with the_loophole_and a derived solution for N=4_without the loophole.

A:

Edit: A lot of_credit is due to @ffao_for_devising_a better way to deal_with the case where there is_just one room_and reducing the solution by one. (Subsequently,_@Lawrence_has managed to do even better_in_their answer).
I now think it can_be_done_with 

 $N=6$

Strategy

 Throughout, we_call the number we have to_remember $k$.  1. Initialise by switching light in_initial room to_OFF and set $k=6$, then_move_one_room anti-clockwise.  2. For each subsequent step,    _(i) if_$k=1$, switch light_in room to ON, set $k=2$ and move one room_anticlockwise,     (ii) if $k=2