#include<bits/stdc++.h>
using namespace std;
double mysprt(double x) {
double L=0, R=x;
while (R-L>0.000001) {
double M=(L+R)/2;
if (M*M>x) R=M;
else L=M;
}
return L;
}
int main() {
//solve sprt(x) 精度0.0001
double x=39;
cout<<fixed<<setprecision(8)<<mysprt(x)<<endl;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin>>n;
int phi = n;
for (int i=2; i*i<=n; i++) {
if (n%i==0) {
phi = phi / i * (i-1);
while (n % i==0) n = n / i;
}
}
if (n>1) phi = phi / n * (n-1);
cout<<phi<<endl;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
while(cin>>n){
long long ans=n;
ans-=n/2+n/5+n/11+n/13;
ans+=n/(2*5)+n/(2*11)+n/(2*13)+n/(5*11)+n/(5*13)+n/(11*13);
ans-=n/(2*5*11)+n/(2*5*13)+n/(2*11*13)+n/(5*11*13);
ans+=n/(2*5*11*13);
cout<<ans<<endl;
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
double L=1.5, R=2.4;
while (R-L>0.00000001){
double M=(L+R)/2;
//L,R 分成 左边L~~M 右边M~~R
//if (f(L)*f(M)<0 在zuobian) R=M;
if ((L*L*L*L*L-15*L*L*L*L+85*L*L*L-225*L*L+274*L-121)*(M*M*M*M*M-15*M*M*M*M+85*M*M*M-225*M*M+274*M-121)<0)
R=M;
else
L=M;
}
cout<<fixed<<setprecision(6)<<L<<endl;
return 0;
}
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
double a,b,c,d,x1,x2;
cin>>a>>b>>c>>d;
x1=(-a+sqrt(a*a-4*b))/2;
x2=(-a-sqrt(a*a-4*b))/2;
if ((c<x1 && x1<d) || (d<x1 && c>x1))
{
cout<<fixed<<setprecision(6)<<x1;
}
else
{
cout<<fixed<<setprecision(6)<<x2;
}
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int a[20];
int main(){
int n=10;
for (int i=1;i<=n;i++) cin>>a[i];
for(int i=1;i<=n;i++)
if(a[i]%2==1) a[i]=-a[i];
for (int i=1;i<=n;i++) {
int k=i;
for (int j=i;j<=n;j++)
if(a[j]<a[k]) k=j;
swap(a[i],a[k]);
}
for(int i=1;i<=n;i++) if (abs(a[i])%2==1) cout<<-a[i]<<" ";
for(int i=1;i<=n;i++) if (a[i]%2==0) cout<<a[i]<<" ";
}
#include <bits/stdc++.h>
using namespace std;
int b[10000005],prime[10000005];
void SF(int n) {
int cnt=0;
for (int i=2;i<=n;i++) {
if (b[i]==0) {
cnt++; prime[cnt]=i;
for(int j=2*i;j<=n;j=j+i) {
b[j]=1;
}
}
}
cout<<endl;
cout<<n<<" "<<cnt<<endl;
}
int main(){
SF(10000000);
return 0;
}