giving d a value worked, thank you. Before i did that, the value for entering 1 was 2147348481, after, it gave the right answer.