int a = (int)(double_value + 0.5);