PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SP0000168. Vi khuẩn kỳ lạ (Mysterious Bacteria)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Vi khuẩn kỳ lạ (Mysterious Bacteria)

Mysterious Bacteria

Source: LightOJ 1220 — https://lightoj.com/volume_showproblem.php?problem=1220
Edition: Phuoc Hung OJ Extended; one dataset per program run. Subtasks are authored for PHOJ, not claimed to be official.

Problem

Given an integer xx, find the largest positive exponent pp for which x=bpx=b^p for an integer base bb. The exponent must be odd for negative xx. Output the original LightOJ case label.

Input

One integer xx; the original TT is removed.

Output

Print exactly Case 1: p.

Subtasks

  • Subtask 1 (20 points): 2≤∣x∣≤1032\le|x|\le10^3.
  • Subtask 2 (30 points): 2≤∣x∣≤1062\le|x|\le10^6.
  • Subtask 3 (50 points): −231≤x≤231−1-2^{31}\le x\le2^{31}-1, ∣x∣≥2|x|\ge2.

Example

Input

1073741824

Output

Case 1: 30

Explanation

1073741824=2301073741824=2^{30}, hence the required result is Case 1: 30.