#include <stdio.h>
#include <stdint.h>
#define BIT_SET(data, field, pos, nbit)\
(data |= (field & ((1<<nbit)-1)) << pos)
uint16_t pack_register(uint8_t mode, uint8_t speed, uint8_t status) {
// Your logic here
uint16_t reg = 0;
BIT_SET(reg, mode, 0, 3);
BIT_SET(reg, speed, 3, 5);
BIT_SET(reg, status, 10, 6);
return reg;
}
int main() {
uint8_t mode, speed, status;
scanf("%hhu %hhu %hhu", &mode, &speed, &status);
uint16_t reg = pack_register(mode, speed, status);
printf("%u", reg);
return 0;
}