Integration of functions of genus 0