Optimize the following Python code to remove any redundant operations.
x = 0
for i in range(100):
    for j in range(100):
        x += i
        x += j
x = 0
for i in range(100):
    x += i * 100
    for j in range(100):
        x += j