You would probably get away with 11-34T if you wanted that.
You need to find the spec of the X4 derailleur for its year, what length of cage it has (there may be multiple models with different cage lengths) and find out its rear capacity. You only really need to do this if you are attempting a...