If Grace has 30 pastries, then both Phoebe and Calvin each have 30-5 = <<30-5=25>>25 pastries.
The total number of pastries that Phoebe and Calvin have is 25+25 = <<25+25=50>>50
Together, Phoebe, Calvin, and Grace have 50+30 = <<50+30=80>>80 pastries.
Since Calvin and Phoebe each have 8 more pastries than Frank, then Frank has 25-8 = <<25-8=17>>17 pastries.
Altogether, the four have 17+80 = <<17+80=97>>97 pastries.
#### 97