#include #define REP(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i)) using namespace std; typedef int64_t ll; const int INF = 1e8; const double EPS = 1e-10; const double PI = 3.141592653589; int main() { ios_base::sync_with_stdio(false); double x, y, r; cin >> x >> y >> r; double k = 0; if(x == 0) { double xx = r*cos(PI/4.0); double yy = y+r*sin(PI/4.0); k = xx + yy; } else { double l = sqrt(x*x+y*y) + r; cout << l << endl; k = l*sin(y/x) + l*cos(y/x); } int kk = (int)k; if(kk - k != 0) { cout << (int)(k)+1 << endl; } else { cout << kk << endl; } }