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 = change.Length-1; i>=0; 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)); change[i] = long.Parse(tmp.ToString().Substring(len - 10)); } else if(len<10) { over[i] = -1; } } else { int len = tmp.ToString().Length; if (tmp.ToString().Length>10) { over[i] = long.Parse(tmp.ToString().Substring(0,len-10)); change[i] = long.Parse(tmp.ToString().Substring(len - 10)); } } } for(int i=0; i<19; i++) { if (i == 0 ) { if (over[0] > 0) ans += over[0].ToString() + "." + change[i].ToString(); else ans += "0." + change[i].ToString(); } else if (i < 18 && (over[i + 1] > 0)) { long tmp = change[i] + over[i + 1]; ans += tmp.ToString(); } else if (i < 18 && over[i + 1] < 0) { ans += change[i].ToString() + "0"; } else if (i == 18) ans += change[i].ToString(); } Console.WriteLine(ans); } } }