#!/usr/bin/env python3 import sys def main(): N = int(input()) P = float(input()) if N >= 200: print(1) return ans = 0 for i in range(N): ans += (1 - ans) * P print(ans) return if __name__ == '__main__': main()