1. A method comprising: in a memory device configured to write data to storage elements, the memory device including a controller, performing: receiving data to be stored into the storage elements; applying a mapping to the received data to generate mapped data, wherein the mapping is configured to increase an average reliability of the memory device by reducing an average number of state changes of the storage elements per write operation, wherein a value of the mapped data is set based on a cycle count of write operations, and wherein a cycle length of the cycle count is the same for at least two successive cycles of the write operations; and writing the mapped data into the storage elements.