DIM X, L, M AS INTEGER INPUT X L = 0 M = 0 WHILE X > 0 M = M + 1 IF X MOD 2 = 0 THEN L = L + 1 ENDIF X = X / 2 WEND PRINT L PRINT M