There were 1238 apples and 374 more pears than apples in the fruit shop. Of these, a few apples were sold, and 276 pears were bought, so the total of apples and pears was 2527. How many apples have been sold?
1238 2527 1238 374 [OP_ADD] 276 [OP_ADD] [OP_SUB] [OP_SUB]
var_a = 1238
var_b = 2527
var_c = 1238
var_d = 374
var_e = var_c + var_d
var_f = 276
var_g = var_e + var_f
var_h = var_b - var_g
var_i = var_a - var_h
print(int(var_i))