Each face of a cube is painted either  red or blue, each with probability 1/2. The color of each face is determined independently.  What is the probability that the painted cube can be placed on a horizontal surface so that the four vertical faces are all the same color?The answer is in the form rac{m}{n}, where gcd(m, n) = 1. Please provide the value of m + n.

Let's think step by step and output the final answer within \boxed{}.
user