// Enter your code here import Foundation func power( base: CLong, expo: CLong ) -> CLong { //Base Case if expo == 0 { return 1; } //Recursive Cases else if expo % 2 == 0 { return power(base, expo: expo / 2) * power(base, expo: expo / 2) } else { return base * power(base, expo: expo / 2) * power(base, expo: expo / 2) } } var count: CLong = 0 let strLine = readLine()! //Stores values let values:[CLong] = strLine.componentsSeparatedByString(" ").map({ CLong($0) ?? 0 }) //Finds base var base: CLong = CLong(Double((values[0] + values[1])) * 0.5) count = power(base, expo: values[2]) count %= 1000000007 print(count)