module global_variables
end module global_variables
program main
  use global_variables
  implicit none
  integer i,j
  read '(b3)', i
!  print '(i0)', sum([(ibits(i,j,1),j=0,2)])
  print '(i0)', popcnt(i)
end program main
