function for donut

write function to calculate donut