Why do you want to access the first array element twice if you can simply compare a already available integer?