#include <iostream> using namespace std; int main(int argc, char *argv[]) { long long n,i,nn,ans,temp,flag,t=1; while(cin>>n&&n) { i=2; flag=0; ans=0; nn=n; cout<<"Case "<<t++<<": "; if(n==1) {cout<<2<<endl; continue;} while(i*i<=nn) { temp=1; while(n%i==0) { temp*=i; n/=i; } if(temp!=1) {ans+=temp;flag++;} i++; } if(nn==n) cout<<nn+1<<endl; else if(flag==1||n!=1) cout<<ans+n<<endl; //此处注意是或者:4=2*2=1*4,但是只能取1*4 else cout<<ans<<endl; } return 0; }