I'm not checking values here so you can try to do stupid stuff that won't work. Up to you.
Values might be a teensy bit off at the end due to rounding.
View source to see how it works. No code is hidden.