Relative Accelerometer Movement

Hi im pretty new in Unity, but i want to know how to make my accelerometer readings relative, i mean, if i rotate the device to make Input.acceleration.x = 0.5 and then rotate back to make Input.acceleration.x = 0.2 have a result of -0.3 in another variable, im trying by storing last acceleration and then make a rest: