(let* ((n (read))
       (a (loop repeat n
             collect (read)))
       (count 0) b)
  (princ (mod
          (loop for c from 0 to 59
             do (setq count 0)
             do (loop for x in a
                   if (eq (mod (ash x (- c)) 2) 1)
                   do (setq count (1+ count))
                   finally (setq b (* count (- n count) (ash 1 c))))
             sum b)
          1000000007)))
