#include <stdio.h>
#include <stdint.h>
int main(void) {
	// your code goes here
	int32_t offset_initial = -1760;
	int32_t r = (offset_initial * 2) / 1000;
	
	int32_t offset = (r + 1) >> 1;
	printf("%d", offset);
	int32_t position = -5;
	int32_t position_shifted = position / 2;
	printf("\n%d", position_shifted);
	int32_t vel = 2;
	int32_t pos = -4;
	//int32_t pos_vel = (pos & 0xFFFFF) | (((uint32_t)vel) & 0xFFF) << 20;
	int32_t pos_vel = (pos & 0xFFFFF)  | (vel & 0xFFF) << 20;
	printf("\n%d", pos_vel);
	int32_t accum_el = -2000000000;
	// uint32_t accum_uint = accum_el;
	// int32_t adjust_el = accum_uint >> 24;
	// adjust_el &= (1 << 24) - 1;
	// accum_el = adjust_el;
	int32_t adjust_el = accum_el / (1 << 24);
	adjust_el &= (1 << 24) - 1;
	accum_el = adjust_el;
	printf("\n%d", accum_el);
	
	return 0;
}
