Same mouse speed for different mouse DPI

I have game mechanic based on how fast you can move mouse. Problem is,that movement of mouse depend on mouse DPI. Normal mouse have cca 1600 DPI but progamers mouse can have 5000 DPI - that is completly different speed. Question is : how can i have same mouse speed for all mouse DPI? (for example how to get mouse dpi and scale it?) (I need to avoid cheating by changing mouse DPI)