takes more than 2 integers as input