-module l. -export[m/0]. m()->{_,[N]}=io:fread('',"~d"),c(N). c(1)->io:write(1);c(N)->io:write(N),io:nl(),c(if N rem 2<1->N div 2;0<1->3*N+1end).