Analog input not allowing full 1024 bits

How you declare your AVGvalue?
1023 x 100 = more than integer could fit, has to be long.