#include<iostream>#include<math.h>#include<iomanip>using namespace std;int main(){ int i=0,n,y; cin>>n; double s; y = 0; while(i<n) { if(i%3==0&&i%7==0) { y=y+i; } i++; } s=sqrt(y); cout<<fixed<<setprecision(2)<<s<<endl;}