The rule of thumb is this: If it's stressed it's "о", if it's unstressed it's "а". But it implies one has the know where the stress is ))