using System; using System.Collections.Generic; using System.Collections; using System.Linq; namespace tes { class contest { static void Main(string[] args) { var num = int.Parse(Console.ReadLine()); string D = "0.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991"; var arr = new string[19]; for (int i = 0; i < 19; i++) { arr[i] = D.Substring(2 + (i * 10), 10); } var change = new long[19]; for (int i = 0; i < 19; i++) { string t = arr[i]; long tmp = 0; if (t[0] == '0') { tmp = long.Parse(t.Substring(1)); } else { tmp = long.Parse(t); } change[i] = tmp * num; } string ans = ""; var over = new long[19]; for (int i = 0; i < 19; i++) { long tmp = change[i]; if (i % 2 == 1) { int len = tmp.ToString().Length; if (tmp.ToString().Length > 10) { over[i] = long.Parse(tmp.ToString().Substring(0, len - 10)); arr[i] = tmp.ToString().Substring(len - 10); } else if (len < 10) { over[i] = -1; arr[i] = tmp.ToString(); } else { arr[i] = tmp.ToString(); } } else { int len = tmp.ToString().Length; if (tmp.ToString().Length > 10) { over[i] = long.Parse(tmp.ToString().Substring(0, len - 10)); arr[i] = tmp.ToString().Substring(len - 10); } else { arr[i] = tmp.ToString(); } } } for (int i = 0; i < 19; i++) { if (i == 0) { long f = long.Parse(arr[i]); if(over[i+1]>0) { f += over[i + 1]; } arr[i] = f.ToString(); if (over[0] > 0) ans += over[0].ToString() + "." + arr[i].ToString(); else ans += "0." + arr[i].ToString(); if (over[i + 1] < 0) ans += "0"; } else if (i < 18 && (over[i + 1] > 0)) { string l = arr[i].Substring(0,7); //l += "000"; string r = arr[i].Substring(7); long tmp = long.Parse(r) + over[i + 1]; ans += l+tmp.ToString(); } else if (i < 18 && over[i + 1] < 0) { ans += arr[i].ToString() + "0"; } else { ans += arr[i].ToString(); } } Console.WriteLine(ans); } } }