how did you calculate the possible ways?​