Let us consider the boxes to be different.
Each object can be kept in 2 ways (either in box `B_(1) " or box B_(2)`)
`therefore` Total number ways `=2^(n)`
This includes cases when all the things are in `B_(1) " or" B_(2)`.
`therefore` Number of ways `=2^(n)-2`
Since the boxes are identical, actual number of ways is
`(2^(n)-2)/(2)=2^(n-1)-1`