Implement serialization and deserialization of Int