#include <stdio.h>
#include <stdint.h>
uint32_t set_bits(uint32_t reg, uint8_t pos, uint8_t len) {
// Your code here
//Create a "mask" that has 1s only in the positions you want to change, and 0s everywhere else.
uint32_t mask = (1<<len) - 1;
//Shift that sequence to the starting pos
//Apply OR: Combine it with the original register.
return reg |= (mask << pos);
}
int main() {
uint32_t reg;
uint8_t pos, len;
scanf("%u %hhu %hhu", ®, &pos, &len);
printf("%u", set_bits(reg, pos, len));
return 0;
}