#define SCNd32 "ld" 

decimal scanf format for int32_t