Elementary Statistics (12th Edition)

O is an outcome's observed frequency (we choose the highest one): O=523. E is the expected outcome: $E=\frac{n}{k}=\frac{1005}{7}=143.57.$