Dennis received $10 x 2 = $<<10*2=20>>20.
So, he received a total of $20 + $3 = $<<20+3=23>>23 change.
Therefore, Dennis initially had $27 + $23 = $<<27+23=50>>50.
#### 50