Added number algorithm