Explicitly declare unsigned ints to prevent precision warnings