added solution for any number