Determine the correct oxidation number assigned to carbon in CaCO3

I think it is +4

Since the oxidation number of calcium is +2 and the oxidation number of O is-2,thus
2+ n(C)+3*(-2)=0
n(C)=+4